QueryRows: Fix being able to reorder rows with keyboard (#77355)

* Revert "Explore: A tooltip for reorder icon in query operation (#75978)"

This reverts commit 76e102d1a3.

* update type

* CI driven development
This commit is contained in:
Ashley Harrison 2023-11-06 13:52:50 +00:00 committed by GitHub
parent 95b48339f8
commit c0afa74876
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,7 +4,7 @@ import { DraggableProvided } from 'react-beautiful-dnd';
import { GrafanaTheme2 } from '@grafana/data';
import { Stack } from '@grafana/experimental';
import { IconButton, useStyles2 } from '@grafana/ui';
import { Icon, IconButton, useStyles2 } from '@grafana/ui';
export interface QueryOperationRowHeaderProps {
actionsElement?: React.ReactNode;
@ -15,7 +15,7 @@ export interface QueryOperationRowHeaderProps {
headerElement?: React.ReactNode;
isContentVisible: boolean;
onRowToggle: () => void;
reportDragMousePosition: MouseEventHandler<HTMLButtonElement>;
reportDragMousePosition: MouseEventHandler<HTMLDivElement>;
title?: string;
id: string;
expanderMessages?: ExpanderMessages;
@ -76,16 +76,9 @@ export const QueryOperationRowHeader = ({
<Stack gap={1} alignItems="center" wrap={false}>
{actionsElement}
{draggable && (
<IconButton
title="Drag and drop to reorder"
name="draggabledots"
tooltip="Drag and drop to reorder"
tooltipPlacement="bottom"
size="lg"
className={styles.dragIcon}
onMouseMove={reportDragMousePosition}
{...dragHandleProps}
/>
<div onMouseMove={reportDragMousePosition} {...dragHandleProps}>
<Icon title="Drag and drop to reorder" name="draggabledots" size="lg" className={styles.dragIcon} />
</div>
)}
</Stack>
</div>