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

IgniteUI / igniteui-angular / 28358286454

29 Jun 2026 08:17AM UTC coverage: 90.127% (-0.05%) from 90.174%
28358286454

Pull #17246

github

web-flow
Merge 21687d939 into 07bdcd752
Pull Request #17246: fix(pivot-grid): fix date format based on the localization

14921 of 17392 branches covered (85.79%)

Branch coverage included in aggregate %.

29 of 32 new or added lines in 4 files covered. (90.63%)

735 existing lines in 76 files now uncovered.

29992 of 32441 relevant lines covered (92.45%)

34632.46 hits per line

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

73.81
/projects/igniteui-angular/combo/src/combo/combo-item.component.ts
1
import {
2
  Component,
3
  HostBinding,
4
  Input,
5
  booleanAttribute,
6
  inject,
7
  ChangeDetectionStrategy
8
} from '@angular/core';
9
import { IgxComboAPIService } from './combo.api';
10
import { rem } from 'igniteui-angular/core';
11
import { IgxCheckboxComponent } from 'igniteui-angular/checkbox';
12
import { IgxDropDownItemComponent, Navigate } from 'igniteui-angular/drop-down';
13

14
/** @hidden */
15
@Component({
16
    selector: 'igx-combo-item',
17
    templateUrl: 'combo-item.component.html',
18
    changeDetection: ChangeDetectionStrategy.Eager,
19
    imports: [IgxCheckboxComponent]
20
})
21
export class IgxComboItemComponent extends IgxDropDownItemComponent {
3✔
22
    protected comboAPI = inject(IgxComboAPIService);
3,097✔
23

24

25
    /**
26
     * Gets the height of a list item
27
     *
28
     * @hidden
29
     */
30
    @Input()
31
    public itemHeight: string | number = '';
3,097✔
32

33
    /** @hidden @internal */
34
    @HostBinding('style.height.rem')
35
    public get _itemHeightToRem() {
36
        if (this.itemHeight) {
43,213✔
37
            return rem(this.itemHeight);
1,398✔
38
        }
39
    }
40

41
    @HostBinding('attr.aria-label')
42
    @Input()
43
    public override get ariaLabel(): string {
44
        const valueKey = this.comboAPI.valueKey;
86,426✔
45
        return (valueKey !== null && this.value != null) ? this.value[valueKey] : this.value;
86,426✔
46
    }
47

48
    /** @hidden @internal */
49
    @Input({ transform: booleanAttribute })
50
    public singleMode: boolean;
51

52
    /**
53
     * @hidden
54
     */
55
    public override get itemID() {
56
        const valueKey = this.comboAPI.valueKey;
23,849✔
57
        return valueKey !== null ? this.value[valueKey] : this.value;
23,849✔
58
    }
59

60
    /**
61
     * @hidden
62
     */
63
    public get comboID() {
UNCOV
64
        return this.comboAPI.comboID;
×
65
    }
66

67
    /**
68
     * @hidden
69
     * @internal
70
     */
71
    public override ngDoCheck(): void {
72
        // Sync state from services once per CD cycle so template bindings return stable field values
73
        this._selected = !this.isHeader && this.value != null && this.comboAPI.is_item_selected(this.itemID);
25,815✔
74
        this._disableTransitions = this.comboAPI.disableTransitions;
25,815✔
75
    }
76

77
    /**
78
     * @hidden
79
     */
80
    public override get selected(): boolean {
81
        return this._selected;
119,558✔
82
    }
83

84
    public override set selected(value: boolean) {
UNCOV
85
        if (this.isHeader) {
×
UNCOV
86
            return;
×
87
        }
UNCOV
88
        this._selected = value;
×
89
    }
90

91
    /**
92
     * @hidden
93
     * @internal
94
     */
95
    public get disableTransitions() {
96
        return this._disableTransitions;
33,195✔
97
    }
98

99
    private _disableTransitions = false;
3,097✔
100

101
    /**
102
     * @hidden
103
     */
104
    public isVisible(direction: Navigate): boolean {
UNCOV
105
        const rect = this.element.nativeElement.getBoundingClientRect();
×
UNCOV
106
        const parentDiv = this.element.nativeElement.parentElement.parentElement.getBoundingClientRect();
×
UNCOV
107
        if (direction === Navigate.Down) {
×
UNCOV
108
            return rect.y + rect.height <= parentDiv.y + parentDiv.height;
×
109
        }
UNCOV
110
        return rect.y >= parentDiv.y;
×
111
    }
112

113
    public override clicked(event): void {
114
        this.comboAPI.disableTransitions = false;
50✔
115
        if (!this.isSelectable) {
50✔
116
            return;
3✔
117
        }
118
        this.dropDown.navigateItem(this.index);
47✔
119
        this.comboAPI.set_selected_item(this.itemID, event);
47✔
120
    }
121

122
    /**
123
     * @hidden
124
     * @internal
125
     * The event that is prevented is the click on the checkbox label element.
126
     * That is the only visible element that a user can interact with.
127
     * The click propagates to the host and the preventDefault is to stop it from
128
     * switching focus to the input it's base on.
129
     * The toggle happens in an internal handler in the drop-down on the next task queue cycle.
130
     */
131
    public disableCheck(event: MouseEvent) {
132
        event.preventDefault();
1✔
133
    }
134
}
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