fix(pivotGrid): Set pivot date dimension locale data to avoid performance drops.#17399
fix(pivotGrid): Set pivot date dimension locale data to avoid performance drops.#17399skrustev wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR targets a PivotGrid performance regression by ensuring IgxPivotDateDimension instances format month names using an explicit locale (and are kept in sync with the grid’s resourceStrings/locale), rather than relying on implicit defaults.
Changes:
- Propagates the PivotGrid
localeandresourceStringsinto configuredIgxPivotDateDimensioninstances. - Updates
IgxPivotDateDimensionmonth formatting to pass an explicit locale intoformatDateTime(...).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| projects/igniteui-angular/grids/pivot-grid/src/pivot-grid.component.ts | Adds date-dimension locale/resource propagation and hooks it into pivot configuration + resource change flow. |
| projects/igniteui-angular/grids/core/src/pivot-grid-dimensions.ts | Adds an internal locale field and uses it for month name formatting via formatDateTime. |
8654113 to
5f58be5
Compare
| this._pivotConfiguration = value; | ||
| this.emitInitEvents(this._pivotConfiguration); | ||
| this.filteringExpressionsTree = PivotUtil.buildExpressionTree(value); | ||
| this.setDateDimensionsLocaleData(); |
There was a problem hiding this comment.
Maybe also call this on pivotConfigurationChange, since someone could potentially add a date dimension runtime via the api. Or toggle it on via the UI/Api.
| * Sets the locale and resourceStrings data based on the grid's properties for all IgxPivotDateDimensions in the config. | ||
| */ | ||
| protected setDateDimensionsLocaleData() { | ||
| const topDimensions = [...this.columnDimensions, ...this.rowDimensions]; |
There was a problem hiding this comment.
Not sure if the issue is applicable to the filterDimensions.
Probably yes, because it would still go though the memberFunction for it. If so then we should filterDimensions to the collection here.
IgniteUI/igniteui-blazor#232
Type of Change (check all that apply):
Component(s) / Area(s) Affected:
PivotGrid
How Has This Been Tested?
Test Configuration:
Checklist:
feature/README.MDupdates for the feature docsREADME.MDCHANGELOG.MDupdates for newly added functionalityng updatemigrations for the breaking changes (migrations guidelines)