Skip to content

Commit

Permalink
feat(Table): fixed toggling indeterminate state
Browse files Browse the repository at this point in the history
  • Loading branch information
tapo4ek committed Sep 26, 2024
1 parent c3adeb9 commit 76ed107
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/TableSettingsColumn/TableSettingsColumn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ export const TableSettingsColumn = <TData extends unknown>({
if (isParent) {
const newState = innerColumns.reduce<Record<string, boolean>>((acc, innerColumn) => {
const result = {...acc};
if (isEnabledHidding(innerColumn)) result[innerColumn.id] = !isVisible;
if (isEnabledHidding(innerColumn))
result[innerColumn.id] = !(isVisible && !isIndeterminate);
return result;
}, {});
onVisibilityToggle((prevState) => ({...prevState, ...newState}));
Expand Down

0 comments on commit 76ed107

Please sign in to comment.