Skip to content

Commit 2bcbcf3

Browse files
fix(@clayui/core): fixes bug when keeping the column visible when it should be hidden
1 parent 1b4a50e commit 2bcbcf3

File tree

1 file changed

+2
-4
lines changed
  • packages/clay-core/src/table

1 file changed

+2
-4
lines changed

packages/clay-core/src/table/Row.tsx

+2-4
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,9 @@ function RowInner<T extends Record<string, any>>(
160160

161161
return [
162162
...Array.from(visibleColumns.values()),
163-
...(columnsVisibility && count > visibleColumns.size
164-
? [count - 1]
165-
: []),
163+
...(columnsVisibility && count > headCellsCount ? [count - 1] : []),
166164
];
167-
}, [columnsVisibility, items?.length, visibleColumns]);
165+
}, [columnsVisibility, items?.length, visibleColumns, headCellsCount]);
168166

169167
const collection = useCollection({
170168
children,

0 commit comments

Comments
 (0)