1
- < ng-template #complex let-display let-data ="data " let-key ="displayKey ">
2
- {{display[key]}}
3
- </ ng-template >
4
- < ng-template #primitive let-display >
5
- {{display}}
6
- </ ng-template >
7
- < ng-template #empty >
8
- < span > The list is empty</ span >
9
- </ ng-template >
10
- < ng-template #addItemDefault let-control >
11
- < button igxButton ="flat " igxRipple > Add item</ button >
12
- </ ng-template >
13
- < ng-template #headerItemBase let-item let-key ="valueKey " let-groupKey ="groupKey ">
14
- {{ item[key] }}
15
- </ ng-template >
16
-
17
1
< igx-input-group #inputGroup [displayDensity] ="displayDensity " [type] ="type " (click) ="onInputClick($event) ">
18
2
< ng-container ngProjectAs ="[igxLabel] ">
19
3
< ng-content select ="[igxLabel] "> </ ng-content >
22
6
< ng-content select ="igx-prefix "> </ ng-content >
23
7
</ ng-container >
24
8
< ng-container ngProjectAs ="igx-hint, [igxHint] ">
25
- < ng-content select ="igx-hint, [igxHint] "> </ ng-content >
26
- </ ng-container >
9
+ < ng-content select ="igx-hint, [igxHint] "> </ ng-content >
10
+ </ ng-container >
27
11
< input igxInput #comboInput name ="comboInput " type ="text " [value] ="value " readonly [attr.placeholder] ="placeholder "
28
12
[disabled] ="disabled " (blur) ="onBlur() " />
29
13
< ng-container ngProjectAs ="igx-suffix ">
30
14
< ng-content select ="igx-suffix "> </ ng-content >
31
15
</ ng-container >
32
- < igx-suffix *ngIf ="value.length " aria-label ="Clear Selection " class ="igx-combo__clear-button " igxRipple (click) ="handleClearItems($event) ">
16
+ < igx-suffix *ngIf ="value.length " aria-label ="Clear Selection " class ="igx-combo__clear-button " igxRipple
17
+ (click) ="handleClearItems($event) ">
33
18
< ng-container *ngIf ="clearIconTemplate ">
34
19
< ng-container *ngTemplateOutlet ="clearIconTemplate "> </ ng-container >
35
20
</ ng-container >
36
- < igx-icon *ngIf ="!clearIconTemplate " fontSet ="material "> clear</ igx-icon >
21
+ < igx-icon *ngIf ="!clearIconTemplate " fontSet ="material ">
22
+ clear
23
+ </ igx-icon >
37
24
</ igx-suffix >
38
25
< igx-suffix igxButton ="icon " class ="igx-combo__toggle-button " igxRipple >
39
26
< ng-container *ngIf ="toggleIconTemplate ">
40
27
< ng-container *ngTemplateOutlet ="toggleIconTemplate; context: {$implicit: this.collapsed} "> </ ng-container >
41
28
</ ng-container >
42
- < igx-icon *ngIf ="!toggleIconTemplate " fontSet ="material "> {{ dropdown.collapsed ? 'arrow_drop_down' : 'arrow_drop_up'}}</ igx-icon >
29
+ < igx-icon *ngIf ="!toggleIconTemplate " fontSet ="material ">
30
+ {{ dropdown.collapsed ? 'arrow_drop_down' : 'arrow_drop_up'}}
31
+ </ igx-icon >
43
32
</ igx-suffix >
44
33
</ igx-input-group >
45
- < igx-combo-drop-down #igxComboDropDown class ="igx-combo__drop-down " [displayDensity] ="displayDensity " [width] ="itemsWidth || '100%' " (onOpening) ="handleOpening($event) "
46
- (onClosing) ="handleClosing($event) " (onOpened) ="handleOpened() " (onClosed) ="handleClosed() ">
34
+ < igx-combo-drop-down #igxComboDropDown class ="igx-combo__drop-down " [displayDensity] ="displayDensity "
35
+ [width] ="itemsWidth || '100%' " (onOpening) ="handleOpening($event) " (onClosing) ="handleClosing($event) "
36
+ (onOpened) ="handleOpened() " (onClosed) ="handleClosed() ">
47
37
< igx-input-group *ngIf ="displaySearchInput " [displayDensity] ="displayDensity " class ="igx-combo__search ">
48
38
< input class ="igx-combo-input " igxInput #searchInput name ="searchInput " autocomplete ="off " type ="text "
49
39
[(ngModel)] ="searchValue " (ngModelChange) ="handleInputChange($event) " (keyup) ="handleKeyUp($event) "
52
42
</ igx-input-group >
53
43
< ng-container *ngTemplateOutlet ="headerTemplate ">
54
44
</ ng-container >
55
- < div #dropdownItemContainer class ="igx-combo__content " [style.overflow] ="'hidden' " [style.maxHeight.px] ="itemsMaxHeight "
56
- [igxDropDownItemNavigation] ="dropdown " (focus) ="dropdown.onFocus() " [tabindex] ="dropdown.collapsed ? -1 : 0 "
57
- role ="listbox " [attr.id] ="dropdown.id ">
58
- < ng-template igxFor let-item let-index ="index " [igxForOf] ="data | comboFiltering:filteringExpressions:filteringLogic | comboSorting:sortingExpressions | comboGrouping:groupKey "
59
- [igxForScrollOrientation] ="'vertical' " [igxForContainerSize] ="itemsMaxHeight " [igxForItemSize] ="itemHeight "
60
- (onChunkPreload) ="dataLoading($event) ">
61
- < igx-combo-item [itemHeight] ='itemHeight ' [value] ="item " [isHeader] ="item.isHeader " role ="option " [index] ="index ">
62
- < ng-container *ngIf ="item.isHeader ">
63
- < ng-container *ngTemplateOutlet ="headerItemTemplate ? headerItemTemplate : headerItemBase; context: {$implicit: item, data: data, valueKey: valueKey, groupKey: groupKey, displayKey: displayKey} "> </ ng-container >
45
+ < div #dropdownItemContainer class ="igx-combo__content " [style.overflow] ="'hidden' "
46
+ [style.maxHeight.px] ="itemsMaxHeight " [igxDropDownItemNavigation] ="dropdown " (focus) ="dropdown.onFocus() "
47
+ [tabindex] ="dropdown.collapsed ? -1 : 0 " role ="listbox " [attr.id] ="dropdown.id ">
48
+ < igx-combo-item role ="option " [itemHeight] ='itemHeight '
49
+ *igxFor ="let item of data
50
+ | comboFiltering:searchValue:displayKey:filterable
51
+ | comboGrouping:groupKey:valueKey;
52
+ index as rowIndex; containerSize: itemsMaxHeight; scrollOrientation: 'vertical'; itemSize: itemHeight "
53
+ [value] ="item " [isHeader] ="item.isHeader " [index] ="rowIndex ">
54
+ < ng-container *ngIf ="item.isHeader ">
55
+ < ng-container
56
+ *ngTemplateOutlet ="headerItemTemplate ? headerItemTemplate : headerItemBase;
57
+ context: {$implicit: item, data: data, valueKey: valueKey, groupKey: groupKey, displayKey: displayKey} ">
64
58
</ ng-container >
65
- < ng-container *ngIf ="!item.isHeader ">
66
- < ng-container #listItem *ngTemplateOutlet ="template; context: {$implicit: item, data: data, valueKey: valueKey, displayKey: displayKey}; "> </ ng-container >
59
+ </ ng-container >
60
+ < ng-container *ngIf ="!item.isHeader ">
61
+ < ng-container #listItem
62
+ *ngTemplateOutlet ="template; context: {$implicit: item, data: data, valueKey: valueKey, displayKey: displayKey}; ">
67
63
</ ng-container >
68
- </ igx-combo-item >
69
- </ ng-template >
64
+ </ ng-container >
65
+ </ igx-combo-item >
70
66
</ div >
71
67
< div class ="igx-combo__add " *ngIf ="filteredData.length === 0 || isAddButtonVisible() ">
72
68
< div class ="igx-combo__empty " *ngIf ="filteredData.length === 0 ">
73
69
< ng-container *ngTemplateOutlet ="emptyTemplate ? emptyTemplate : empty ">
74
70
</ ng-container >
75
71
</ div >
76
- < igx-combo-add-item [itemHeight] ='itemHeight ' *ngIf ="isAddButtonVisible() " [tabindex] ="dropdown.collapsed ? -1 : customValueFlag ? 1 : -1 "
77
- class ="igx-combo__add-item " role ="button " aria-label ="Add Item " [index] ="virtualScrollContainer.igxForOf.length ">
72
+ < igx-combo-add-item [itemHeight] ='itemHeight ' *ngIf ="isAddButtonVisible() "
73
+ [tabindex] ="dropdown.collapsed ? -1 : customValueFlag ? 1 : -1 " class ="igx-combo__add-item " role ="button "
74
+ aria-label ="Add Item " [index] ="virtualScrollContainer.igxForOf.length ">
78
75
< ng-container *ngTemplateOutlet ="addItemTemplate ? addItemTemplate : addItemDefault ">
79
76
</ ng-container >
80
77
</ igx-combo-add-item >
81
78
</ div >
82
79
< ng-container *ngTemplateOutlet ="footerTemplate ">
83
80
</ ng-container >
84
81
</ igx-combo-drop-down >
82
+ < ng-template #complex let-display let-data ="data " let-key ="displayKey ">
83
+ {{display[key]}}
84
+ </ ng-template >
85
+ < ng-template #primitive let-display >
86
+ {{display}}
87
+ </ ng-template >
88
+ < ng-template #empty >
89
+ < span > The list is empty</ span >
90
+ </ ng-template >
91
+ < ng-template #addItemDefault let-control >
92
+ < button igxButton ="flat " igxRipple > Add item</ button >
93
+ </ ng-template >
94
+ < ng-template #headerItemBase let-item let-key ="valueKey " let-groupKey ="groupKey ">
95
+ {{ item[key] }}
96
+ </ ng-template >
0 commit comments