[v11.1.x] Table: Fix state bug with initialRowIndex (#90370)
Table: Fix state bug with initialRowIndex (#90308)
* fix: fix state bug
---------
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
(cherry picked from commit 8400b54a53)
Co-authored-by: Galen Kistler <109082771+gtk-grafana@users.noreply.github.com>
This commit is contained in:
co-authored by
Galen Kistler
parent
eab471a17c
commit
abd9e86fe6
@@ -80,6 +80,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();
|
||||
|
||||
Reference in New Issue
Block a user