import * as React from 'react'; import { CellMeasurerCache, CellMeasurer } from 'react-virtualized'; import { Button } from '@patternfly/react-core'; import { AngleDownIcon } from '@patternfly/react-icons/dist/esm/icons/angle-down-icon'; import { AngleRightIcon } from '@patternfly/react-icons/dist/esm/icons/angle-right-icon'; import { VirtualTableBody } from '@patternfly/react-virtualized-extension'; import { Scroll } from '@patternfly/react-virtualized-extension/dist/js/components/Virtualized/types'; import { K8sResourceCommon } from '../../../types/k8s'; import { TableData } from './TableData'; import { TableRow, TableRowProps } from './TableRow'; import './Table.scss'; export type VirtualBodyProps = { customData?: C; Row: React.FC>; ExpandedContent?: React.FC>>; height: number; isScrolling: boolean; onChildScroll: (params: Scroll) => void; data: D[]; columns: unknown[]; scrollTop: number; width: number; expand: boolean; getRowProps?: (obj: D) => Partial>; onRowsRendered?: (params: { overscanStartIndex: number; overscanStopIndex: number; startIndex: number; stopIndex: number; }) => void; }; export type RowFunctionArgs = { obj: T; columns: unknown[]; customData?: C; index?: number; }; const RowMemo = React.memo< RowFunctionArgs & { Row: React.FC; expand: boolean; isExpanded: boolean; onToggle: (index: number) => void; index: number; } >(({ Row, expand, isExpanded, onToggle, index, ...props }) => { if (expand) { return ( <>