Table: Fix state bug with initialRowIndex (#90308)

* fix: fix state bug

---------

Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
pull/90376/head
Galen Kistler 2 years ago committed by GitHub
parent da2962418d
commit 8400b54a53
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      packages/grafana-ui/src/components/Table/RowsList.tsx

@ -81,6 +81,9 @@ export const RowsList = (props: RowsListProps) => {
} = props;
const [rowHighlightIndex, setRowHighlightIndex] = useState<number | undefined>(initialRowIndex);
if (initialRowIndex === undefined && rowHighlightIndex !== undefined) {
setRowHighlightIndex(undefined);
}
const theme = useTheme2();
const panelContext = usePanelContext();

Loading…
Cancel
Save