fix(pivotGrid): Fix error thrown opening date pivot dimension filter. - #17479
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes an error in the Pivot Grid when opening a date pivot dimension filter by deferring column regeneration triggered by i18n resource changes, avoiding conflicting Angular change detection/collection updates.
Changes:
- Defer
setupColumns()execution in the i18nonResourceChangehandler via a microtask (Promise.resolve().then(...)).
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Suppressed comments (1)
projects/igniteui-angular/grids/pivot-grid/src/pivot-grid.spec.ts:846
getI18nManageris no longer used in this spec after removing the listener workaround, but the import remains. This leaves an unused import (and can fail lint/TS checks with no-unused-vars/noUnusedLocals). Remove thegetI18nManagerimport from the top of the file.
const pivotGrid = fixture.componentInstance.pivotGrid;
expect(pivotGrid.filterStrategy).toBeInstanceOf(DimensionValuesFilteringStrategy);
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Suppressed comments (1)
projects/igniteui-angular/grids/pivot-grid/src/pivot-grid.component.ts:1003
- The
setupColumns()call is now deferred viaPromise.resolve().then(...), but that microtask isn’t tied todestroy$. If the grid gets destroyed after the i18nonResourceChangecallback runs (but before the microtask executes), this can invokesetupColumns()on a destroyed component and throw (the base grid sets_destroyed = trueinngOnDestroy). Guard the microtask with_destroyed(or an equivalent destroy check).
Promise.resolve().then(() => {
this.setupColumns();
});
MayaKirova
approved these changes
Aug 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #17478
Description
Issue was cause due to conflicting Angular collections when triggering detect change while another happens.
Type of Change (check all that apply):
Component(s) / Area(s) Affected:
Pivot grid
How Has This Been Tested?
Test Configuration:
Screenshots / Recordings
Checklist:
feature/README.MDupdates for the feature docsREADME.MDCHANGELOG.MDupdates for newly added functionalityng updatemigrations for the breaking changes (migrations guidelines)