diff --git a/packages/core/src/components/Table/TableVirtualizedBody/TableVirtualizedBody.tsx b/packages/core/src/components/Table/TableVirtualizedBody/TableVirtualizedBody.tsx index 78e79e0815..2156266554 100644 --- a/packages/core/src/components/Table/TableVirtualizedBody/TableVirtualizedBody.tsx +++ b/packages/core/src/components/Table/TableVirtualizedBody/TableVirtualizedBody.tsx @@ -3,6 +3,9 @@ import { VibeComponentProps } from "../../../types"; import VirtualizedList, { VirtualizedListItem } from "../../VirtualizedList/VirtualizedList"; import TableBody from "../TableBody/TableBody"; import styles from "./TableVirtualizedBody.module.scss"; +import cx from "classnames"; +import { getTestId } from "../../../tests/test-ids-utils"; +import { ComponentDefaultTestId } from "../../../tests/constants"; import { ScrollDirection } from "react-window"; import { TableContext } from "../Table/Table"; import { RowHeights } from "../Table/TableConsts"; @@ -13,7 +16,14 @@ export interface ITableVirtualizedBodyProps extends VibeComponentProps { onScroll?: (horizontalScrollDirection: ScrollDirection, scrollTop: number, scrollUpdateWasRequested: boolean) => void; } -const TableVirtualizedBody: FC = ({ items, rowRenderer, onScroll }) => { +const TableVirtualizedBody: FC = ({ + items, + rowRenderer, + onScroll, + id, + className, + "data-testid": dataTestId +}) => { const itemRenderer: ComponentProps["itemRenderer"] = useCallback( (value, index: number, style: CSSProperties) => { const element = rowRenderer(value); @@ -24,7 +34,11 @@ const TableVirtualizedBody: FC = ({ items, rowRender const { size } = useContext(TableContext); return ( - + {items?.length && (