Skip to content

Commit

Permalink
fix(DataGrid): column customisation not unselect locked columns (carb…
Browse files Browse the repository at this point in the history
…on-design-system#4191)

* fix(DataGrid): column customisation not unselect locked columns

* chore(DataGrid): remove unwanted map
  • Loading branch information
Ratheeshrajan authored Feb 1, 2024
1 parent 633de43 commit 566aa31
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const Columns = ({
[columns, setColumnsObject]
);

const filteredStickyColumn = columns?.filter((item) => !item.sticky);
return (
<div
className={`${blockClass}__customize-columns-column-list`}
Expand Down Expand Up @@ -89,7 +90,7 @@ const Columns = ({
}
onChange={() => {
onSelectColumn(
columns,
filteredStickyColumn,
getVisibleColumnsCount() !== columns.length
);
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const CustomizeColumnsTearsheet = ({
const onCheckboxCheck = (col, value) => {
const changedDefinitions = columnObjects.map((definition) => {
if (
(Array.isArray(col) && col.indexOf(definition) != null) ||
(Array.isArray(col) && col.indexOf(definition) != -1) ||
definition.id === col.id
) {
return { ...definition, isVisible: value };
Expand Down

0 comments on commit 566aa31

Please sign in to comment.