-
Notifications
You must be signed in to change notification settings - Fork 664
T1311329 - DataGrid - Column chooser hides a banded column on using search and recursive selection #32186
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes a bug (T1311329) where the DataGrid column chooser incorrectly hides a banded (parent) column when using search functionality with recursive selection enabled. The issue occurred because column visibility was being updated without considering the relationship between banded columns and their children.
Changes:
- Refactored column visibility update logic to handle banded columns correctly by processing them in sorted order (non-band columns first, then band columns)
- Added integration tests to verify the fix for both the search scenario and direct toggling of banded columns
- Created reusable test model classes (TreeViewModel, TextBoxModel, CheckBoxModel, ColumnChooserModel) to support the new tests
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/devextreme/js/__internal/grids/grid_core/column_chooser/m_column_chooser.ts | Refactored column visibility logic to correctly handle banded columns by sorting nodes and determining visibility based on child column states |
| packages/devextreme/js/__internal/grids/grid_core/column_chooser/tests/column_chooser.integration.test.ts | Added comprehensive integration tests for the banded column visibility fix |
| packages/devextreme/js/__internal/grids/grid_core/tests/mock/model/grid_core.ts | Added getColumnChooser method to support column chooser testing |
| packages/devextreme/js/__internal/grids/grid_core/tests/mock/model/column_chooser.ts | Created model class for interacting with column chooser in tests |
| packages/devextreme/js/__internal/ui/tests/mock/model/tree_view.ts | Created reusable model for TreeView interactions in tests |
| packages/devextreme/js/__internal/ui/tests/mock/model/textbox.ts | Created reusable model for TextBox interactions in tests |
| packages/devextreme/js/__internal/ui/tests/mock/model/checkbox.ts | Created reusable model for CheckBox interactions in tests |
packages/devextreme/js/__internal/grids/grid_core/column_chooser/m_column_chooser.ts
Outdated
Show resolved
Hide resolved
packages/devextreme/js/__internal/grids/grid_core/column_chooser/m_column_chooser.ts
Show resolved
Hide resolved
packages/devextreme/js/__internal/ui/__tests__/__mock__/model/tree_view.ts
Show resolved
Hide resolved
packages/devextreme/js/__internal/grids/grid_core/__tests__/__mock__/model/column_chooser.ts
Show resolved
Hide resolved
...me/js/__internal/grids/grid_core/column_chooser/__tests__/column_chooser.integration.test.ts
Show resolved
Hide resolved
packages/devextreme/js/__internal/grids/grid_core/column_chooser/m_column_chooser.ts
Outdated
Show resolved
Hide resolved
packages/devextreme/js/__internal/grids/grid_core/column_chooser/m_column_chooser.ts
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
packages/devextreme/js/__internal/grids/grid_core/column_chooser/m_column_chooser.ts
Show resolved
Hide resolved
packages/devextreme/js/__internal/grids/grid_core/column_chooser/m_column_chooser.ts
Outdated
Show resolved
Hide resolved
packages/devextreme/js/__internal/ui/__tests__/__mock__/model/tree_view.ts
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
packages/devextreme/js/__internal/grids/grid_core/column_chooser/m_column_chooser.ts
Outdated
Show resolved
Hide resolved
packages/devextreme/js/__internal/ui/__tests__/__mock__/model/tree_view.ts
Show resolved
Hide resolved
...me/js/__internal/grids/grid_core/column_chooser/__tests__/column_chooser.integration.test.ts
Show resolved
Hide resolved
packages/devextreme/js/__internal/grids/grid_core/column_chooser/m_column_chooser.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.
...me/js/__internal/grids/grid_core/column_chooser/__tests__/column_chooser.integration.test.ts
Show resolved
Hide resolved
packages/devextreme/js/__internal/ui/__tests__/__mock__/model/tree_view.ts
Show resolved
Hide resolved
packages/devextreme/js/__internal/grids/grid_core/column_chooser/m_column_chooser.ts
Show resolved
Hide resolved
packages/devextreme/js/__internal/ui/__tests__/__mock__/model/textbox.ts
Show resolved
Hide resolved
...me/js/__internal/grids/grid_core/column_chooser/__tests__/column_chooser.integration.test.ts
Show resolved
Hide resolved
0b2e291 to
ceb624a
Compare
packages/devextreme/js/__internal/grids/grid_core/column_chooser/m_column_chooser.ts
Outdated
Show resolved
Hide resolved
ceb624a to
779d885
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.
packages/devextreme/js/__internal/grids/grid_core/column_chooser/m_column_chooser.ts
Show resolved
Hide resolved
packages/devextreme/js/__internal/grids/grid_core/column_chooser/m_column_chooser.ts
Show resolved
Hide resolved
packages/devextreme/js/__internal/grids/grid_core/__tests__/__mock__/model/column_chooser.ts
Show resolved
Hide resolved
| visibleColumnsLevel0 = instance.getVisibleColumns(0); | ||
| visibleColumnsLevel1 = instance.getVisibleColumns(1); | ||
|
|
||
| expect(visibleColumnsLevel0.find((col) => col.caption === 'Contacts')).toBeDefined(); |
Copilot
AI
Jan 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test uses .toBeDefined() which passes even when find() returns undefined. This assertion will always pass because find() always returns a value (either an object or undefined), and undefined.toBeDefined() is true. Use .toBeTruthy() or check the result with .not.toBeUndefined() for the intended behavior.
...me/js/__internal/grids/grid_core/column_chooser/__tests__/column_chooser.integration.test.ts
Show resolved
Hide resolved
26523fe to
3bb66d2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.
…earch and recursive selection (DevExpress#32186) Co-authored-by: Danil Mirgaev <danil.mirgaev@devexpress.com>
…earch and recursive selection (DevExpress#32186) Co-authored-by: Danil Mirgaev <danil.mirgaev@devexpress.com>
No description provided.