-
Notifications
You must be signed in to change notification settings - Fork 664
DataGrid: prevent column resizing in band area (T1317039) #32263
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
DataGrid: prevent column resizing in band area (T1317039) #32263
Conversation
cec3960 to
1251a32
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
This PR fixes an issue where DataGrid columns could be resized from the band header area, which should not be allowed. The fix adds Y-coordinate checking to the column resizing logic to ensure resizing only occurs when the mouse is positioned within the actual resizable column header row, not in the band header area above it.
Changes:
- Modified the
_getTargetPointmethod to accept aCoordinatesobject (with both x and y) instead of just x coordinate, and added logic to check if the mouse Y position is at or below the top of the resizable column header - Added proper null safety checks for
_targetPointthroughout the codebase to handle cases where it may now be null when the mouse is in the band area - Created a new
functional.tstest file for functional column resizing tests and moved the existing visual test case, while adding a new test case specifically for the band area resizing prevention
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
packages/devextreme/js/__internal/grids/grid_core/m_types.ts |
Added new Coordinates interface to represent x and y coordinate pairs |
packages/devextreme/js/__internal/grids/grid_core/columns_resizing_reordering/m_columns_resizing_reordering.ts |
Updated _getTargetPoint to accept Coordinates object and check Y coordinate; added null safety in _setupResizingInfo; improved type annotations; refactored pointsByColumns method |
packages/devextreme/js/__internal/grids/grid_core/column_fixing/m_column_fixing.ts |
Updated overridden _getTargetPoint method signature to match base class changes |
packages/devextreme/js/__internal/grids/grid_core/filter/m_filter_row.ts |
Added null safety checks with optional chaining for _targetPoint accesses |
packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/columnFixing.tests.js |
Updated QUnit test calls to pass Coordinates object instead of just x coordinate |
e2e/testcafe-devextreme/tests/dataGrid/common/columnResizing/visual.ts |
Updated import paths and removed one test case (moved to functional.ts) |
e2e/testcafe-devextreme/tests/dataGrid/common/columnResizing/functional.ts |
New file containing functional tests for column resizing, including the moved test and a new test case for band area resizing prevention (T1317039) |
9a9e265 to
77d6a6c
Compare
77d6a6c to
e40c9d5
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 16 changed files in this pull request and generated 2 comments.
...e/js/__internal/grids/grid_core/columns_resizing_reordering/m_columns_resizing_reordering.ts
Show resolved
Hide resolved
e2e/testcafe-devextreme/tests/dataGrid/common/columnResizing/functional.ts
Show resolved
Hide resolved
packages/devextreme/js/__internal/grids/grid_core/filter/m_filter_row.ts
Outdated
Show resolved
Hide resolved
e2e/testcafe-devextreme/tests/dataGrid/common/columnResizing/functional.ts
Show resolved
Hide resolved
6744e3b to
61079f9
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 16 changed files in this pull request and generated no new comments.
61079f9 to
2930cee
Compare
No description provided.