Skip to content

Conversation

@AlisherAmonulloev
Copy link
Contributor

No description provided.

@AlisherAmonulloev AlisherAmonulloev self-assigned this Jan 31, 2026
@AlisherAmonulloev AlisherAmonulloev requested a review from a team as a code owner January 31, 2026 11:28
Copilot AI review requested due to automatic review settings January 31, 2026 11:28
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 optimizes the PivotGrid widget by creating the FieldChooserBase component only once during the initial render, then updating its options on subsequent renders instead of recreating it each time. This reduces overhead and prevents accumulation of duplicate event listeners.

Changes:

  • Modified _renderContentImpl to conditionally create FieldChooserBase on first drawing or update options on subsequent renders
  • Added a test verifying that FieldChooserBase maintains a single instance and doesn't accumulate event listeners when the dataSource is reassigned

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
packages/devextreme/js/__internal/grids/pivot_grid/m_widget.ts Modified FieldChooserBase initialization to create once and update options on re-renders
packages/devextreme/testing/tests/DevExpress.ui.widgets.pivotGrid/pivotGrid.tests.js Added test verifying single FieldChooserBase instance with no stale references or listener accumulation

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.

2 participants