• 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

39.08
/projects/igniteui-angular/grids/core/src/watch-changes.ts
1
import { SimpleChanges, SimpleChange } from '@angular/core';
2

3
/**
4
 * @hidden
5
 */
6
export function WatchChanges(): PropertyDecorator {
7
    return (target: any, key: string, propDesc?: PropertyDescriptor) => {
57✔
8
        const privateKey = '_' + key.toString();
57✔
9
        propDesc = propDesc || {
57!
10
            configurable: true,
11
            enumerable: true,
12
        };
13
        propDesc.get = propDesc.get || (function (this: any) {
57!
14
            return this[privateKey];
×
15
        });
16
        const originalSetter = propDesc.set || (function (this: any, val: any) {
57!
17
            this[privateKey] = val;
×
18
        });
19

20
        propDesc.set = function (this: any, val: any) {
57✔
UNCOV
21
            const init = this._init;
×
UNCOV
22
            const oldValue = this[key];
×
UNCOV
23
            if (val !== oldValue || (typeof val === 'object' && val === oldValue)) {
×
UNCOV
24
                originalSetter.call(this, val);
×
UNCOV
25
                if (this.ngOnChanges && !init) {
×
26
                    // in case wacthed prop changes trigger ngOnChanges manually
UNCOV
27
                    const changes: SimpleChanges = {
×
28
                        [key]: new SimpleChange(oldValue, val, false)
29
                    };
UNCOV
30
                    this.ngOnChanges(changes);
×
31
                }
32
            }
33
        };
34
        return propDesc;
57✔
35
    };
36
}
37

38
export function WatchColumnChanges(): PropertyDecorator {
39
    return (target: any, key: string, propDesc?: PropertyDescriptor) => {
117✔
40
        const privateKey = '_' + key.toString();
117✔
41
        propDesc = propDesc || {
117✔
42
            configurable: true,
43
            enumerable: true,
44
        };
45
        propDesc.get = propDesc.get || (function (this: any) {
117✔
UNCOV
46
            return this[privateKey];
×
47
        });
48
        const originalSetter = propDesc.set || (function (this: any, val: any) {
117✔
UNCOV
49
            this[privateKey] = val;
×
50
        });
51

52
        propDesc.set = function (this: any, val: any) {
117✔
UNCOV
53
            const oldValue = this[key];
×
UNCOV
54
            originalSetter.call(this, val);
×
UNCOV
55
            if (val !== oldValue || (typeof val === 'object' && val === oldValue)) {
×
UNCOV
56
                if (this.columnChange) {
×
UNCOV
57
                    this.columnChange.emit();
×
58
                }
59
            }
60
        };
61
        return propDesc;
117✔
62
    };
63
}
64

65
export function notifyChanges(repaint = false) {
69✔
66
    return (_: any, key: string, propDesc?: PropertyDescriptor) => {
87✔
67

68
        const privateKey = `__${key}`;
87✔
69

70
        propDesc = propDesc || {
87!
71
            enumerable: true,
72
            configurable: true
73
        };
74

75

76
        const originalSetter = propDesc ? propDesc.set : null;
87!
77
        propDesc.get = propDesc.get || (function (this) {
87!
78
            return this[privateKey];
×
79
        });
80

81
        propDesc.set = function (this, newValue) {
87✔
UNCOV
82
            if (originalSetter) {
×
UNCOV
83
                originalSetter.call(this, newValue);
×
UNCOV
84
                if (this.grid) {
×
UNCOV
85
                    this.grid.notifyChanges(repaint && this.type !== 'pivot');
×
86
                }
87
            } else {
88
                if (newValue === this[key]) {
×
89
                    return;
×
90
                }
91
                this[privateKey] = newValue;
×
92
                if (this.grid) {
×
93
                    this.grid.notifyChanges(repaint && this.type !== 'pivot');
×
94
                }
95
            }
96
        };
97
        return propDesc as any;
87✔
98
    };
99
}
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