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

IgniteUI / igniteui-angular / 30900836661

04 Aug 2026 10:29AM UTC coverage: 90.158% (+0.02%) from 90.142%
30900836661

Pull #17426

github

web-flow
Merge 69cfe1a89 into 1dad56c3b
Pull Request #17426: fix(grid): Recalculate horizontal size cache when scrolling horizontally with autosized columns

14918 of 17380 branches covered (85.83%)

Branch coverage included in aggregate %.

3 of 3 new or added lines in 1 file covered. (100.0%)

197 existing lines in 3 files now uncovered.

29998 of 32439 relevant lines covered (92.48%)

37680.73 hits per line

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

84.09
/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) => {
60✔
8
        const privateKey = '_' + key.toString();
60✔
9
        propDesc = propDesc || {
60✔
10
            configurable: true,
11
            enumerable: true,
12
        };
13
        propDesc.get = propDesc.get || (function (this: any) {
60✔
14
            return this[privateKey];
14,402✔
15
        });
16
        const originalSetter = propDesc.set || (function (this: any, val: any) {
60✔
17
            this[privateKey] = val;
5,489✔
18
        });
19

20
        propDesc.set = function (this: any, val: any) {
60✔
21
            const init = this._init;
16,980✔
22
            const oldValue = this[key];
16,980✔
23
            if (val !== oldValue || (typeof val === 'object' && val === oldValue)) {
16,980✔
24
                originalSetter.call(this, val);
15,824✔
25
                // Explicitly check whether the decorator is called during initialization
26
                if (this.ngOnChanges && init !== undefined && !init) {
15,824✔
27
                    // in case wacthed prop changes trigger ngOnChanges manually
28
                    const changes: SimpleChanges = {
1,868✔
29
                        [key]: new SimpleChange(oldValue, val, false)
30
                    };
31
                    this.ngOnChanges(changes);
1,868✔
32
                }
33
            }
34
        };
35
        return propDesc;
60✔
36
    };
37
}
38

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

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

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

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

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

76

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

82
        propDesc.set = function (this, newValue) {
87✔
83
            if (originalSetter) {
520,288!
84
                originalSetter.call(this, newValue);
520,288✔
85
                if (this.grid) {
520,288✔
86
                    this.grid.notifyChanges(repaint && this.type !== 'pivot');
520,288✔
87
                }
88
            } else {
89
                if (newValue === this[key]) {
×
UNCOV
90
                    return;
×
91
                }
92
                this[privateKey] = newValue;
×
93
                if (this.grid) {
×
UNCOV
94
                    this.grid.notifyChanges(repaint && this.type !== 'pivot');
×
95
                }
96
            }
97
        };
98
        return propDesc as any;
87✔
99
    };
100
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc