diff --git a/packages/bento-design-system/src/Table/Table.tsx b/packages/bento-design-system/src/Table/Table.tsx index dfa8c38e7..8629549f0 100644 --- a/packages/bento-design-system/src/Table/Table.tsx +++ b/packages/bento-design-system/src/Table/Table.tsx @@ -386,7 +386,7 @@ export function Table< } const renderedRows = virtualizeRows - ? columns + ? flatColumns .map((_, index) => (
)) @@ -403,7 +403,7 @@ export function Table< }) ) .concat( - columns.map((_, index) => ( + flatColumns.map((_, index) => (
)) ) diff --git a/packages/bento-design-system/stories/Components/Table.stories.tsx b/packages/bento-design-system/stories/Components/Table.stories.tsx index 7ac70ebda..76f50cf16 100644 --- a/packages/bento-design-system/stories/Components/Table.stories.tsx +++ b/packages/bento-design-system/stories/Components/Table.stories.tsx @@ -577,3 +577,13 @@ export const VirtualizedRows = { data: repeatToLength(exampleData, 1_000), }, } satisfies Story; + +export const VirtualizedRowsGrupedHeaders = { + args: { + columns: exampleGroupedColumns, + stickyHeaders: true, + height: { custom: 340 }, + virtualizeRows: true, + data: repeatToLength(exampleData, 1_000), + }, +} satisfies Story;