diff --git a/packages/grafana-ui/src/components/Table/FilterList.tsx b/packages/grafana-ui/src/components/Table/FilterList.tsx index 308b4d7f575..0867631fe93 100644 --- a/packages/grafana-ui/src/components/Table/FilterList.tsx +++ b/packages/grafana-ui/src/components/Table/FilterList.tsx @@ -1,7 +1,7 @@ import { css, cx } from '@emotion/css'; import { useCallback, useMemo } from 'react'; import * as React from 'react'; -import { FixedSizeList as List } from 'react-window'; +import { FixedSizeList as List, ListChildComponentProps } from 'react-window'; import { GrafanaTheme2, formattedValueToString, getValueFormat, SelectableValue } from '@grafana/data'; @@ -190,20 +190,11 @@ export const FilterList = ({ height={height} itemCount={items.length} itemSize={ITEM_HEIGHT} + itemData={{ items, values: selectedItems, onCheckedChanged, className: styles.filterListRow }} width="100%" className={styles.filterList} > - {({ index, style }) => { - const option = items[index]; - const { value, label } = option; - const isChecked = values.find((s) => s.value === value) !== undefined; - - return ( -