Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(DataGrid): column customisation not unselect locked columns #4191

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)?.map(item=> item);
Ratheeshrajan marked this conversation as resolved.
Show resolved Hide resolved
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
Loading