14
14
{{ item[key] }}
15
15
</ ng-template >
16
16
17
- < div class ="igx-combo " [style.width] ="width " role ="combobox " [attr.aria-expanded] ="!dropdown.collapsed " aria-haspopup ="listbox " [attr.aria-owns] ="dropdown.id ">
18
- < igx-input-group [type] ="type " (click) ="onInputClick($event) ">
19
- < input igxInput #comboInput name ="comboInput " type ="text " [(ngModel)] ="value " readonly [placeholder] ="placeholder " [disabled] ="disabled " (blur) ="onBlur($event) "/>
20
- < igx-suffix *ngIf ="value.length " class ="clearButton " aria-label ="Clear Selection " igxRipple (click) ="handleClearItems($event) ">
21
- < igx-icon fontSet ="material "> clear</ igx-icon >
22
- </ igx-suffix >
23
- < igx-suffix igxButton ="icon " class ="dropdownToggleButton " igxRipple >
24
- < igx-icon *ngIf ="dropdown.collapsed; else toggleUp " fontSet ="material "> arrow_drop_down</ igx-icon >
25
- < ng-template #toggleUp >
26
- < igx-icon fontSet ="material "> arrow_drop_up</ igx-icon >
27
- </ ng-template >
28
- </ igx-suffix >
17
+ < igx-input-group [type] ="type " [displayDensity] ="displayDensity " (click) ="onInputClick($event) ">
18
+ < input igxInput #comboInput name ="comboInput " type ="text " [(ngModel)] ="value " readonly [placeholder] ="placeholder "
19
+ [disabled] ="disabled " (blur) ="onBlur($event) " />
20
+ < igx-suffix *ngIf ="value.length " class ="clearButton " aria-label ="Clear Selection " igxRipple (click) ="handleClearItems($event) ">
21
+ < igx-icon fontSet ="material "> clear</ igx-icon >
22
+ </ igx-suffix >
23
+ < igx-suffix igxButton ="icon " class ="dropdownToggleButton " igxRipple >
24
+ < igx-icon *ngIf ="dropdown.collapsed; else toggleUp " fontSet ="material "> arrow_drop_down</ igx-icon >
25
+ < ng-template #toggleUp >
26
+ < igx-icon fontSet ="material "> arrow_drop_up</ igx-icon >
27
+ </ ng-template >
28
+ </ igx-suffix >
29
+ </ igx-input-group >
30
+ < igx-combo-drop-down #igxComboDropDown class ="igx-combo__drop-down " [displayDensity] ="displayDensity " [width] ="itemsWidth || '100%' ">
31
+ < igx-input-group class ="igx-combo__search " [displayDensity] ="displayDensity ">
32
+ < input class ="igx-combo-input " igxInput #searchInput name ="searchInput " type ="text " [(ngModel)] ="searchValue "
33
+ (ngModelChange) ="handleInputChange($event) " (keyup) ="handleKeyUp($event) " (keydown) ="handleKeyDown($event) "
34
+ (focus) ="dropdown.onBlur($event) " [placeholder] ="searchPlaceholder " aria-autocomplete ="both "
35
+ [attr.aria-owns] ="dropdown.id " [attr.aria-labelledby] ="ariaLabelledBy " />
29
36
</ igx-input-group >
30
- < igx-combo-drop-down #igxComboDropDown class ="igx-combo__drop-down " [width] ="itemsWidth || '100%' ">
31
- < igx-input-group class ="igx-combo__search ">
32
- < input class ="igx-combo-input " igxInput #searchInput name ="searchInput " type ="text " [(ngModel)] ="searchValue " (ngModelChange) ="handleInputChange($event) "
33
- (keyup) ="handleKeyUp($event) " (keydown) ="handleKeyDown($event) " (focus) ="dropdown.onBlur($event) " [placeholder] ="searchPlaceholder " aria-autocomplete ="both "
34
- [attr.aria-owns] ="dropdown.id " [attr.aria-labelledby] ="ariaLabelledBy " />
35
- </ igx-input-group >
36
- < ng-container *ngTemplateOutlet ="headerTemplate; context: {$implicit: this} ">
37
- </ ng-container >
38
- < div #dropdownItemContainer class ="igx-combo__content " [style.overflow] ="'hidden' " [style.maxHeight.px] ="itemsMaxHeight "
39
- [igxDropDownItemNavigation] ="dropdown " [tabindex] ="dropdown.collapsed ? -1 : 0 " role ="listbox " [attr.id] ="dropdown.id ">
40
- < ng-template igxFor let-item [igxForOf] ="data | comboFiltering:filteringExpressions:filteringLogic | comboSorting:sortingExpressions | comboGrouping:groupKey "
41
- [igxForScrollOrientation] ="'vertical' " [igxForContainerSize] ="itemsMaxHeight "
42
- [igxForItemSize] ="itemHeight " (onChunkPreload) ="dataLoading($event) " #virtualScrollContainer >
43
- < igx-combo-item [value] ="item " isHeader ={{item.isHeader}} role ="option ">
44
- < ng-container *ngIf ="!item.isHeader ">
45
- < igx-checkbox [checked] ="isItemSelected(item) " disableRipple ="true " disabled ="true " class ="igx-combo__checkbox "> </ igx-checkbox >
46
- </ ng-container >
47
- < ng-container *ngIf ="item.isHeader ">
48
- < ng-container *ngTemplateOutlet ="headerItemTemplate ? headerItemTemplate : headerItemBase; context: {$implicit: item, data: data, valueKey: valueKey, groupKey: groupKey, displayKey: displayKey} "> </ ng-container >
49
- </ ng-container >
50
- < ng-container *ngIf ="!item.isHeader ">
51
- < ng-container #listItem *ngTemplateOutlet ="template; context: {$implicit: item, data: data, valueKey: valueKey, displayKey: displayKey}; "> </ ng-container >
52
- </ ng-container >
53
- </ igx-combo-item >
54
- </ ng-template >
55
- </ div >
56
- < div class ="igx-combo__add " *ngIf ="filteredData.length === 0 || isAddButtonVisible() ">
57
- < div class ="igx-combo__empty " *ngIf ="filteredData.length === 0 ">
58
- < ng-container *ngTemplateOutlet ="emptyTemplate ? emptyTemplate : empty; context: {$implicit: this} ">
37
+ < ng-container *ngTemplateOutlet ="headerTemplate; context: {$implicit: this} ">
38
+ </ ng-container >
39
+ < div #dropdownItemContainer class ="igx-combo__content " [style.overflow] ="'hidden' " [style.maxHeight.px] ="itemsMaxHeight "
40
+ [igxDropDownItemNavigation] ="dropdown " [tabindex] ="dropdown.collapsed ? -1 : 0 " role ="listbox " [attr.id] ="dropdown.id ">
41
+ < ng-template igxFor let-item [igxForOf] ="data | comboFiltering:filteringExpressions:filteringLogic | comboSorting:sortingExpressions | comboGrouping:groupKey "
42
+ [igxForScrollOrientation] ="'vertical' " [igxForContainerSize] ="itemsMaxHeight " [igxForItemSize] ="itemHeight "
43
+ (onChunkPreload) ="dataLoading($event) " #virtualScrollContainer >
44
+ < igx-combo-item [value] ="item " isHeader ={{item.isHeader}} role ="option ">
45
+ < ng-container *ngIf ="!item.isHeader ">
46
+ < igx-checkbox [checked] ="isItemSelected(item) " disableRipple ="true " disabled ="true " class ="igx-combo__checkbox "> </ igx-checkbox >
47
+ </ ng-container >
48
+ < ng-container *ngIf ="item.isHeader ">
49
+ < ng-container *ngTemplateOutlet ="headerItemTemplate ? headerItemTemplate : headerItemBase; context: {$implicit: item, data: data, valueKey: valueKey, groupKey: groupKey, displayKey: displayKey} "> </ ng-container >
59
50
</ ng-container >
60
- </ div >
61
- < igx-combo-item *ngIf ="isAddButtonVisible() " [tabindex] ="dropdown.collapsed ? -1 : customValueFlag ? 1 : -1 " class ="igx-combo__add-item "
62
- igxRipple (keypress) ="addItemToCollection() " [isHeader] ="false " [disabled] ="false " [value] ="'ADD ITEM' " role ="button "
63
- aria-label ="Add Item ">
64
- < ng-container *ngTemplateOutlet ="addItemTemplate ? addItemTemplate : addItemDefault; context: {$implicit: this} ">
51
+ < ng-container *ngIf ="!item.isHeader ">
52
+ < ng-container #listItem *ngTemplateOutlet ="template; context: {$implicit: item, data: data, valueKey: valueKey, displayKey: displayKey}; "> </ ng-container >
65
53
</ ng-container >
66
54
</ igx-combo-item >
55
+ </ ng-template >
56
+ </ div >
57
+ < div class ="igx-combo__add " *ngIf ="filteredData.length === 0 || isAddButtonVisible() ">
58
+ < div class ="igx-combo__empty " *ngIf ="filteredData.length === 0 ">
59
+ < ng-container *ngTemplateOutlet ="emptyTemplate ? emptyTemplate : empty; context: {$implicit: this} ">
60
+ </ ng-container >
67
61
</ div >
68
- < ng-container *ngTemplateOutlet ="footerTemplate; context: {$implicit: this} ">
69
- </ ng-container >
70
- </ igx-combo-drop-down >
71
- </ div >
62
+ < igx-combo-item *ngIf ="isAddButtonVisible() " [tabindex] ="dropdown.collapsed ? -1 : customValueFlag ? 1 : -1 "
63
+ class ="igx-combo__add-item " igxRipple (keypress) ="addItemToCollection() " [isHeader] ="false " [disabled] ="false "
64
+ [value] ="'ADD ITEM' " role ="button " aria-label ="Add Item ">
65
+ < ng-container *ngTemplateOutlet ="addItemTemplate ? addItemTemplate : addItemDefault; context: {$implicit: this} ">
66
+ </ ng-container >
67
+ </ igx-combo-item >
68
+ </ div >
69
+ < ng-container *ngTemplateOutlet ="footerTemplate; context: {$implicit: this} ">
70
+ </ ng-container >
71
+ </ igx-combo-drop-down >
0 commit comments