-
Notifications
You must be signed in to change notification settings - Fork 665
T1319739 - DataGrid - Columns are misaligned after adding a column at runtime #32283
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 (T1319739) where DataGrid columns become misaligned after adding or removing a column at runtime when repaintChangesOnly is enabled. The fix ensures that a full repaint is triggered when the column count changes, preventing header and data cell misalignment.
Changes:
- Extracted repaint logic into a new
needFullRepaintmethod in the data controller - Added detection for column count changes to trigger full repaint
- Added integration tests for both adding and removing columns with
repaintChangesOnly=true
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
packages/devextreme/js/__internal/grids/grid_core/data_controller/m_data_controller.ts |
Adds needFullRepaint method to detect when full grid repaint is needed, including when column count changes |
packages/devextreme/js/__internal/grids/grid_core/columns_controller/__tests__/columns_controller.integration.test.ts |
Adds integration tests verifying that adding/removing columns maintains correct alignment between headers and data cells |
| e.group = columnsController.getGroupDataSourceParameters(!dataSource.remoteOperations().grouping); | ||
| } | ||
|
|
||
| private needFullRepaint(optionNames, changeTypes) { |
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.
Don't we have an agreement to name private methods with _?
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 modern code we write without underscore.
Earlier we wrote underscore to show the method is private but now we have Typescript and just the modifier "private")
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 3 out of 3 changed files in this pull request and generated 1 comment.
No description provided.