• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

IgniteUI / igniteui-angular / 26023601418

18 May 2026 08:57AM UTC coverage: 4.854% (-85.3%) from 90.174%
26023601418

Pull #17281

github

web-flow
Merge e7ce7a18e into 5a85df190
Pull Request #17281: feat: Added virtual scroll component and sample implementation

400 of 17347 branches covered (2.31%)

Branch coverage included in aggregate %.

63 of 222 new or added lines in 4 files covered. (28.38%)

27932 existing lines in 341 files now uncovered.

2022 of 32547 relevant lines covered (6.21%)

0.72 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

1.75
/projects/igniteui-angular/grids/pivot-grid/src/pivot-row.component.ts
1
import {
2
    ChangeDetectionStrategy,
3
    Component,
4
    forwardRef,
5
    HostBinding, inject, Input, ViewContainerRef
6
} from '@angular/core';
7
import { NgClass, NgStyle } from '@angular/common';
8
import {
9
    IGX_GRID_BASE,
10
    IgxColumnComponent,
11
    IgxGridCellComponent,
12
    IgxGridCellStylesPipe,
13
    IgxGridNotGroupedPipe,
14
    IgxGridTransactionStatePipe,
15
    IgxRowDirective,
16
    IPivotGridColumn,
17
    IPivotGridRecord,
18
    PivotGridType,
19
    PivotUtil
20
} from 'igniteui-angular/grids/core';
21
import { IgxPivotGridCellStyleClassesPipe } from './pivot-grid.pipes';
22
import { IgxGridForOfDirective } from 'igniteui-angular/directives';
23
import { IgxCheckboxComponent } from 'igniteui-angular/checkbox';
24

25
@Component({
26
    changeDetection: ChangeDetectionStrategy.OnPush,
27
    selector: 'igx-pivot-row',
28
    templateUrl: './pivot-row.component.html',
UNCOV
29
    providers: [{ provide: IgxRowDirective, useExisting: forwardRef(() => IgxPivotRowComponent) }],
×
30
    imports: [IgxGridForOfDirective, IgxGridCellComponent, NgClass, NgStyle, IgxCheckboxComponent, IgxGridNotGroupedPipe, IgxGridCellStylesPipe, IgxGridTransactionStatePipe, IgxPivotGridCellStyleClassesPipe]
31
})
32
export class IgxPivotRowComponent extends IgxRowDirective {
3✔
33
    /* blazorSuppress */
UNCOV
34
    public override grid = inject<PivotGridType>(IGX_GRID_BASE);
×
UNCOV
35
    protected viewRef = inject(ViewContainerRef);
×
36

37
    /**
38
     * @hidden
39
     */
40
    @Input()
41
    @HostBinding('attr.aria-selected')
42
    public override get selected(): boolean {
UNCOV
43
        let isSelected = false;
×
UNCOV
44
        for (const rowDim of this.data.dimensions) {
×
UNCOV
45
            const key = PivotUtil.getRecordKey(this.data, rowDim);
×
UNCOV
46
            if (this.selectionService.isPivotRowSelected(key)) {
×
UNCOV
47
                isSelected = true;
×
48
            }
49
        }
UNCOV
50
        return isSelected;
×
51
    }
52

53
    /**
54
     * @hidden
55
     * @internal
56
     */
57
    public override get viewIndex(): number {
UNCOV
58
        return this.index;
×
59
    }
60

61
    /**
62
     * @hidden
63
     * @internal
64
     */
UNCOV
65
    public override disabled = false;
×
66

67
    /**
68
     * @hidden
69
     * @internal
70
     */
71
    public override get addRowUI(): any {
UNCOV
72
        return false;
×
73
    }
74

75
    /**
76
     * @hidden
77
     * @internal
78
     */
79
    public override get inEditMode(): boolean {
UNCOV
80
        return false;
×
81
    }
82

83
    /**
84
     * @hidden
85
     * @internal
86
     */
87
    public override set pinned(_value: boolean) {
88
    }
89

90
    public override get pinned(): boolean {
UNCOV
91
        return false;
×
92
    }
93

94
    /**
95
     * @hidden
96
     * @internal
97
     */
98
    public override delete() {
99
    }
100

101
    /**
102
     * @hidden
103
     * @internal
104
     */
105
    public override beginAddRow() {
106
    }
107

108
    /**
109
     * @hidden
110
     * @internal
111
     */
112
    public override update(_value: any) {
113
    }
114

115
    /**
116
     * @hidden
117
     * @internal
118
     */
119
    public override pin() {
120
        return false;
×
121
    }
122

123
    /**
124
    * @hidden
125
    * @internal
126
    */
127
    public override unpin() {
128
        return false;
×
129
    }
130

131
    /**
132
    *  The pivot record data passed to the row component.
133
    *
134
    * ```typescript
135
    * // get the pivot row data for the first selected row
136
    * let selectedRowData = this.grid.selectedRows[0].data;
137
    * ```
138
    */
139
    @Input()
140
    public override get data(): IPivotGridRecord {
UNCOV
141
        return this._data;
×
142
    }
143

144
    public override set data(v: IPivotGridRecord) {
UNCOV
145
        this._data = v;
×
146
    }
147

148
    /**
149
     * @hidden
150
     * @internal
151
     */
152
    public get pivotAggregationData() {
UNCOV
153
        const aggregations = this.data.aggregationValues;
×
UNCOV
154
        const obj = {};
×
UNCOV
155
        aggregations.forEach((value, key) => {
×
UNCOV
156
            obj[key] = value;
×
157
        });
UNCOV
158
        return obj;
×
159
    }
160

161
    public getCellClass(col: IgxColumnComponent) {
UNCOV
162
        const values = this.grid.values;
×
UNCOV
163
        if (values.length === 1) {
×
UNCOV
164
            return values[0].styles;
×
165
        }
UNCOV
166
        const colName = col.field.split(this.grid.pivotKeys.columnDimensionSeparator);
×
UNCOV
167
        const measureName = colName[colName.length - 1];
×
UNCOV
168
        return values.find(v => v.member === measureName)?.styles;
×
169
    }
170

171
    public override isCellActive(visibleColumnIndex) {
UNCOV
172
        const nav = this.grid.navigation
×
UNCOV
173
        const node = nav.activeNode;
×
UNCOV
174
        return node && Object.keys(node).length !== 0 ?
×
175
            !nav.isRowHeaderActive &&
×
176
            !nav.isRowDimensionHeaderActive &&
177
            super.isCellActive(visibleColumnIndex) :
178
            false;
179
    }
180

181
    public getColumnData(col: IgxColumnComponent) : IPivotGridColumn {
UNCOV
182
        const path = col.field.split(this.grid.pivotKeys.columnDimensionSeparator);
×
UNCOV
183
        const keyValueMap = new Map<string, string>();
×
UNCOV
184
        const colDimensions = PivotUtil.flatten(this.grid.columnDimensions);
×
UNCOV
185
        for (const dim of colDimensions) {
×
UNCOV
186
            keyValueMap.set(dim.memberName, path.shift());
×
187
        }
188
        let pivotValue;
UNCOV
189
        if (this.grid.hasMultipleValues && path.length) {
×
UNCOV
190
            pivotValue = this.grid.values.find(x => x.member === path[0]);
×
191
        } else {
UNCOV
192
            pivotValue = this.grid.values ? this.grid.values[0] : undefined;
×
193
        }
UNCOV
194
        return {
×
195
            field: col.field,
196
            dimensions: this.grid.columnDimensions,
197
            dimensionValues: keyValueMap,
198
            value: pivotValue
199
        };
200
    }
201
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc