diff --git a/packages/clay-core/src/table/Row.tsx b/packages/clay-core/src/table/Row.tsx index efdf9aa171..5ec4a80a15 100644 --- a/packages/clay-core/src/table/Row.tsx +++ b/packages/clay-core/src/table/Row.tsx @@ -153,10 +153,16 @@ function RowInner>( const ref = useForwardRef(outRef); - const visibleKeys = useMemo( - () => Array.from(visibleColumns.values()), - [visibleColumns] - ); + const visibleKeys = useMemo(() => { + const count = React.Children.count(children); + + return [ + ...Array.from(visibleColumns.values()), + ...(columnsVisibility && count > visibleColumns.size + ? [count - 1] + : []), + ]; + }, [columnsVisibility, visibleColumns]); const collection = useCollection({ children,