mirror of https://github.com/grafana/grafana.git
[release-11.6.2] Table: Fix nested table bug (#105490)
Table: Fix nested table bug (#105133)
chore: remove expandedKey index for key rerendering
(cherry picked from commit 0041c7e9b7)
This commit is contained in:
parent
e9b0b090c6
commit
dfdc748ef3
|
|
@ -420,9 +420,6 @@ export const RowsList = (props: RowsListProps) => {
|
|||
}
|
||||
};
|
||||
|
||||
// Key the virtualizer for expanded rows
|
||||
const expandedKey = Object.keys(tableState.expanded).join('|');
|
||||
|
||||
// It's a hack for text wrapping.
|
||||
// VariableSizeList component didn't know that we manually set row height.
|
||||
// So we need to reset the list when the rows high changes.
|
||||
|
|
@ -435,8 +432,7 @@ export const RowsList = (props: RowsListProps) => {
|
|||
return (
|
||||
<CustomScrollbar onScroll={handleScroll} hideHorizontalTrack={true} scrollTop={scrollTop}>
|
||||
<VariableSizeList
|
||||
// This component needs an unmount/remount when row height, page changes, or expanded rows change
|
||||
key={`${rowHeight}${pageIndex}${expandedKey}`}
|
||||
key={`${rowHeight}${pageIndex}`}
|
||||
height={listHeight}
|
||||
itemCount={itemCount}
|
||||
itemSize={getItemSize}
|
||||
|
|
|
|||
Loading…
Reference in New Issue