Skip to content

T1328904 - TreeList — Auto-width columns are incorrectly resized in Firefox#34190

Open
Tucchhaa wants to merge 9 commits into
DevExpress:26_1from
Tucchhaa:firefox_autowidth_26_1
Open

T1328904 - TreeList — Auto-width columns are incorrectly resized in Firefox#34190
Tucchhaa wants to merge 9 commits into
DevExpress:26_1from
Tucchhaa:firefox_autowidth_26_1

Conversation

@Tucchhaa

@Tucchhaa Tucchhaa commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@Tucchhaa Tucchhaa self-assigned this Jul 1, 2026
@Tucchhaa Tucchhaa added the 26_1 label Jul 1, 2026
Copilot AI review requested due to automatic review settings July 1, 2026 12:04
@Tucchhaa Tucchhaa requested a review from a team as a code owner July 1, 2026 12:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Fixes TreeList layout recalculation so that columnAutoWidth columns are properly resized (notably in Firefox) when nodes are expanded/collapsed, by forcing a full dimension update for that specific operation.

Changes:

  • Track the last expandedRowKeys value in the TreeList data source adapter and flag a new operationTypes.nodeExpanding when it changes.
  • In TreeList’s data controller, translate operationTypes.nodeExpanding into change.needUpdateDimensions so the view layer performs a full resize.
  • Refactor ResizingController._refreshSizes to more clearly decide between lightweight row resize vs full resize() based on needUpdateDimensions.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
packages/devextreme/js/__internal/grids/tree_list/data_source_adapter/m_data_source_adapter.ts Detects changes in expandedRowKeys and marks a dedicated operation type (nodeExpanding).
packages/devextreme/js/__internal/grids/tree_list/data_controller/m_data_controller.ts Forces needUpdateDimensions on update cycles triggered by node expanding/collapsing.
packages/devextreme/js/__internal/grids/grid_core/views/m_grid_view.ts Ensures update refresh logic triggers full resize when needUpdateDimensions is requested.

Copilot AI review requested due to automatic review settings July 1, 2026 13:59
Comment thread e2e/testcafe-devextreme/tests/common/treeList/column_auto_width.ts
Comment thread e2e/testcafe-devextreme/tests/common/treeList/column_auto_width.ts
Comment thread e2e/testcafe-devextreme/tests/common/treeList/column_auto_width.ts
const currentExpandedKeys = this.option('expandedRowKeys');

if (!equalByValue(this._lastExpandedRowKeys, currentExpandedKeys)) {
operationTypes.nodeExpanding = true;

@Raushen Raushen Jul 2, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I see there is not such type of operations. Can we reuse existing one? For example the reload type?

@Tucchhaa Tucchhaa Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, that is a new type. I am not sure if we should reuse reload type, because:

  1. it may lead to some side effects (reload type is already used in several places)
  2. definition of reload operation type is already very vague and overlaoded. I mean what's the difference between fullReload and reload, and why reload is true when specific operations are true

operationTypes.nodeExpanding has simple and concrete meaning on the other hand. So I suggest to keep it

What do you think?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ok, sounds fair. Anyway I'd suggest to include new type in the existing calculateOperationTypes so all types could be visible and calculated in one place. Can we move calculation there?

@Tucchhaa Tucchhaa Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

operationTypes.nodeExpanding is used only in treelist (and not in datagrid), so I think moving to grid_core maybe confusing.

I suggest to move calculateOperationTypes from utils to member function of GridCore DataSourceAdapter and extend this method in TreeList's DataSourceAdapter.

Does it sound good to you?

Comment thread e2e/testcafe-devextreme/tests/common/treeList/column_auto_width.ts Outdated
Comment thread e2e/testcafe-devextreme/tests/common/treeList/column_auto_width.ts Outdated
Comment thread e2e/testcafe-devextreme/tests/common/treeList/column_auto_width.ts
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.

3 participants