Skip to content

Conversation

@anna-shakhova
Copy link
Contributor

No description provided.

@anna-shakhova anna-shakhova self-assigned this Jan 21, 2026
@anna-shakhova anna-shakhova requested a review from a team as a code owner January 21, 2026 15:16
Copilot AI review requested due to automatic review settings January 21, 2026 15:16
@anna-shakhova anna-shakhova changed the title DataGrid: prevent column resizing in band area DataGrid: prevent column resizing in band area (T1317039) Jan 21, 2026
@anna-shakhova anna-shakhova force-pushed the 26_1__T1317039-banded-columns-resize branch from cec3960 to 1251a32 Compare January 21, 2026 15:20
Copy link
Contributor

Copilot AI left a 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 _getTargetPoint method to accept a Coordinates object (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 _targetPoint throughout the codebase to handle cases where it may now be null when the mouse is in the band area
  • Created a new functional.ts test 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)

@anna-shakhova anna-shakhova force-pushed the 26_1__T1317039-banded-columns-resize branch 2 times, most recently from 9a9e265 to 77d6a6c Compare January 21, 2026 15:54
Copilot AI review requested due to automatic review settings January 21, 2026 15:54
@anna-shakhova anna-shakhova force-pushed the 26_1__T1317039-banded-columns-resize branch from 77d6a6c to e40c9d5 Compare January 21, 2026 15:59
Copy link
Contributor

Copilot AI left a 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.

if (pointsByColumns) {
for (let i = 0; i < pointsByColumns.length; i++) {
if (pointsByColumns[i].x === pointsByColumns[0].x && pointsByColumns[i + 1] && pointsByColumns[i].x === pointsByColumns[i + 1].x) {
for (let i = 0; i < pointsByColumns.length; i += 1) {
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incrementing with i += 1 is unnecessarily verbose. Use the standard i++ increment operator for consistency with JavaScript conventions.

Suggested change
for (let i = 0; i < pointsByColumns.length; i += 1) {
for (let i = 0; i < pointsByColumns.length; i++) {

Copilot uses AI. Check for mistakes.
};

// T1317039
test('DataGrid – Columns should not be resized from band area (T1317039)', async (t) => {
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test validates the Y-coordinate restriction when resizing from the band area, but there should also be a test verifying that normal column resizing (within valid Y bounds) still works correctly after this change.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant