Skip to content

Commit 38a214b

Browse files
MKirovaMKirova
authored andcommitted
Remove private constructor.
1 parent 37f3e9b commit 38a214b

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

projects/igniteui-angular/src/lib/data-operations/pivot-strategy.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ export interface IPivotDimensionStrategy {
1212
export class NoopPivotDimensionsStrategy implements IPivotDimensionStrategy {
1313
private static _instance: NoopPivotDimensionsStrategy = null;
1414

15-
private constructor() { }
16-
1715
public static instance() {
1816
return this._instance || (this._instance = new NoopPivotDimensionsStrategy());
1917
}
@@ -27,8 +25,6 @@ export class NoopPivotDimensionsStrategy implements IPivotDimensionStrategy {
2725
export class PivotRowDimensionsStrategy implements IPivotDimensionStrategy {
2826
private static _instance: PivotRowDimensionsStrategy = null;
2927

30-
private constructor() { }
31-
3228
public static instance() {
3329
return this._instance || (this._instance = new PivotRowDimensionsStrategy());
3430
}
@@ -84,8 +80,6 @@ export class PivotRowDimensionsStrategy implements IPivotDimensionStrategy {
8480
export class PivotColumnDimensionsStrategy implements IPivotDimensionStrategy {
8581
private static _instance: PivotRowDimensionsStrategy = null;
8682

87-
private constructor() { }
88-
8983
public static instance() {
9084
return this._instance || (this._instance = new PivotColumnDimensionsStrategy());
9185
}

src/app/pivot-grid-noop/pivot-grid-noop.sample.ts

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
import { Component, ViewChild } from '@angular/core';
2-
import { IgxNumberSummaryOperand, IgxPivotGridComponent, IPivotConfiguration, NoopPivotDimensionsStrategy } from 'igniteui-angular';
2+
import { IgxNumberSummaryOperand, IgxPivotGridComponent, IPivotConfiguration, IPivotDimension, IPivotDimensionStrategy,
3+
IPivotValue,
4+
NoopPivotDimensionsStrategy } from 'igniteui-angular';
5+
6+
7+
8+
export class MyRowStrategy extends NoopPivotDimensionsStrategy {
9+
public process(collection: any[], _: IPivotDimension[], __: IPivotValue[]): any[] {
10+
return collection;
11+
}
12+
}
13+
14+
export class MyColumnStrategy extends NoopPivotDimensionsStrategy {
15+
public process(collection: any[], _: IPivotDimension[], __: IPivotValue[]): any[] {
16+
return collection;
17+
}
18+
}
19+
320

421
@Component({
522
providers: [],
@@ -10,7 +27,6 @@ import { IgxNumberSummaryOperand, IgxPivotGridComponent, IPivotConfiguration, No
1027

1128
export class PivotGridNoopSampleComponent {
1229
@ViewChild('grid1', { static: true }) public grid1: IgxPivotGridComponent;
13-
1430
public pivotConfigHierarchy: IPivotConfiguration = {
1531
columnStrategy: NoopPivotDimensionsStrategy.instance(),
1632
rowStrategy: NoopPivotDimensionsStrategy.instance(),

0 commit comments

Comments
 (0)