Skip to content

Commit 4c7192b

Browse files
Svetoslav KrastevSvetoslav Krastev
authored andcommitted
chore(*): Update pivot state handling with latest date dimension changes.
1 parent d199386 commit 4c7192b

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

projects/igniteui-angular/src/lib/grids/pivot-grid/pivot-grid-dimensions.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export class IgxPivotDateDimension implements IPivotDimension {
5353
*/
5454
public dataType?: GridColumnDataType;
5555

56-
/** Default options used for initialization. */
56+
/** Default options. */
5757
public defaultOptions = {
5858
total: true,
5959
years: true,
@@ -101,7 +101,7 @@ export class IgxPivotDateDimension implements IPivotDimension {
101101
}
102102

103103
/**
104-
* @deprecated in version 15.1.x. Please use the new `options`
104+
* @deprecated since version 15.1.x. Please use the new name `baseDimension` for future versions.
105105
*
106106
* Gets the base dimension that is used by this class to determine the other dimensions and their values.
107107
* Having base dimension set is required in order for the Date Dimensions to show.
@@ -111,7 +111,7 @@ export class IgxPivotDateDimension implements IPivotDimension {
111111
}
112112

113113
/**
114-
* @deprecated in version 15.1.x. Please use the new `options`
114+
* @deprecated since version 15.1.x. Please use the new name `options` for future versions.
115115
*
116116
* Gets the options for the predefined date dimensions whether to show quarter, years and etc.
117117
*/

projects/igniteui-angular/src/lib/grids/state.directive.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ export class IgxGridStateDirective {
401401
pivotConfiguration: {
402402
getFeatureState(context: IgxGridStateDirective): IGridState {
403403
const config = (context.currGrid as IgxPivotGridComponent).pivotConfiguration;
404-
if (!config || !(context.currGrid instanceof IgxPivotGridComponent)) {
404+
if (!config || !(context.currGrid instanceof IgxPivotGridComponent)) {
405405
return { pivotConfiguration: undefined };
406406
}
407407
const configCopy = cloneValue(config);
@@ -418,14 +418,14 @@ export class IgxGridStateDirective {
418418
},
419419
restoreFeatureState(context: IgxGridStateDirective, state: any): void {
420420
const config: IPivotConfiguration = state;
421-
if (!config || !(context.currGrid instanceof IgxPivotGridComponent)) {
421+
if (!config || !(context.currGrid instanceof IgxPivotGridComponent)) {
422422
return;
423423
}
424424
context.restoreValues(config, context.currGrid as IgxPivotGridComponent);
425425
context.restoreDimensions(config, context.currGrid as IgxPivotGridComponent);
426426
(context.currGrid as IgxPivotGridComponent).pivotConfiguration = config;
427427
},
428-
428+
429429

430430
}
431431
};
@@ -600,7 +600,7 @@ export class IgxGridStateDirective {
600600
* This method restores the IgxPivotDateDimension with its default functions and resource strings.
601601
*/
602602
private restoreDateDimension(dim: IgxPivotDateDimension) {
603-
const dateDim = new IgxPivotDateDimension((dim as any).inBaseDimension, (dim as any).inOptions);
603+
const dateDim = new IgxPivotDateDimension((dim as any)._baseDimension, (dim as any)._options);
604604
// restore functions and resource strings
605605
dim.resourceStrings = dateDim.resourceStrings;
606606
dim.memberFunction = dateDim.memberFunction;
@@ -617,7 +617,7 @@ export class IgxGridStateDirective {
617617
* Returns if this is a IgxPivotDateDimension.
618618
*/
619619
private isDateDimension(dim: IPivotDimension) {
620-
return (dim as any).inBaseDimension;
620+
return (dim as any)._baseDimension;
621621
}
622622

623623
/**
@@ -677,11 +677,11 @@ export class IgxGridStateDirective {
677677

678678
let condition = this.generateFilteringCondition(dataType, expr.condition.name) ||
679679
this.currGrid.columns.find(c => c.field === expr.fieldName).filters.condition(expr.condition.name);
680-
680+
681681
if (condition) {
682682
expr.condition = condition;
683683
expressionsTree.filteringOperands.push(expr);
684-
}
684+
}
685685
}
686686
}
687687

0 commit comments

Comments
 (0)