Skip to content

Commit

Permalink
[DataTable]: fixed hiding isLocked columns by 'Clear All' action
Browse files Browse the repository at this point in the history
  • Loading branch information
AlekseyManetov committed Oct 10, 2024
1 parent 0fbce56 commit e45e421
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function toggleAllColumnsVisibility(props: { prevConfig: ColumnsConfig; c
const prevCfg = prevConfig[key];
const c = columns.find((column) => column.key === key);
const isAlreadyToggled = value ? prevCfg.isVisible : !prevCfg.isVisible;
const tryingToHideAlwaysVisible = !value && c.isAlwaysVisible;
const tryingToHideAlwaysVisible = !value && (c.isAlwaysVisible || c.isLocked);
const noChangeRequired = isAlreadyToggled || tryingToHideAlwaysVisible || isEmptyCaption(c.caption);
if (noChangeRequired) {
acc[key] = prevCfg;
Expand Down

0 comments on commit e45e421

Please sign in to comment.