1
1
import { Directive } from '@angular/core' ;
2
2
3
3
/**
4
- * @hidden
4
+ * Allows a custom element to be added at the beginning of the combo list.
5
+ *
6
+ * @igxModule IgxComboModule
7
+ * @igxTheme igx-combo-theme
8
+ * @igxKeywords combobox, combo selection
9
+ * @igxGroup Grids & Lists
10
+ *
11
+ * @example
12
+ * <igx-combo>
13
+ * <ng-template igxComboHeader>
14
+ * <div class="header-class">Custom header</div>
15
+ * <img src=""/>
16
+ * </ng-template>
17
+ * </igx-combo>
5
18
*/
6
19
@Directive ( {
7
20
selector : '[igxComboHeader]' ,
@@ -10,7 +23,20 @@ import { Directive } from '@angular/core';
10
23
export class IgxComboHeaderDirective { }
11
24
12
25
/**
13
- * @hidden
26
+ * Allows a custom element to be added at the end of the combo list.
27
+ *
28
+ * @igxModule IgxComboModule
29
+ * @igxTheme igx-combo-theme
30
+ * @igxKeywords combobox, combo selection
31
+ * @igxGroup Grids & Lists
32
+ *
33
+ * @example
34
+ * <igx-combo>
35
+ * <ng-template igxComboFooter>
36
+ * <div class="footer-class">Custom footer</div>
37
+ * <img src=""/>
38
+ * </ng-template>
39
+ * </igx-combo>
14
40
*/
15
41
@Directive ( {
16
42
selector : '[igxComboFooter]' ,
@@ -19,7 +45,22 @@ export class IgxComboHeaderDirective { }
19
45
export class IgxComboFooterDirective { }
20
46
21
47
/**
22
- * @hidden
48
+ * Allows the combo's items to be modified with a custom template
49
+ *
50
+ * @igxModule IgxComboModule
51
+ * @igxTheme igx-combo-theme
52
+ * @igxKeywords combobox, combo selection
53
+ * @igxGroup Grids & Lists
54
+ *
55
+ * @example
56
+ * <igx-combo>
57
+ * <ng-template igxComboItem let-display let-key="valueKey">
58
+ * <div class="item">
59
+ * <span class="state">State: {{ display[key] }}</span>
60
+ * <span class="region">Region: {{ display.region }}</span>
61
+ * </div>
62
+ * </ng-template>
63
+ * </igx-combo>
23
64
*/
24
65
@Directive ( {
25
66
selector : '[igxComboItem]' ,
@@ -28,7 +69,21 @@ export class IgxComboFooterDirective { }
28
69
export class IgxComboItemDirective { }
29
70
30
71
/**
31
- * @hidden
72
+ * Defines the custom template that will be displayed when the combo's list is empty
73
+ *
74
+ * @igxModule IgxComboModule
75
+ * @igxTheme igx-combo-theme
76
+ * @igxKeywords combobox, combo selection
77
+ * @igxGroup Grids & Lists
78
+ *
79
+ * @example
80
+ * <igx-combo>
81
+ * <ng-template igxComboEmpty>
82
+ * <div class="combo--empty">
83
+ * There are no items to display
84
+ * </div>
85
+ * </ng-template>
86
+ * </igx-combo>
32
87
*/
33
88
@Directive ( {
34
89
selector : '[igxComboEmpty]' ,
@@ -37,7 +92,19 @@ export class IgxComboItemDirective { }
37
92
export class IgxComboEmptyDirective { }
38
93
39
94
/**
40
- * @hidden
95
+ * Defines the custom template that will be used when rendering header items for groups in the combo's list
96
+ *
97
+ * @igxModule IgxComboModule
98
+ * @igxTheme igx-combo-theme
99
+ * @igxKeywords combobox, combo selection
100
+ * @igxGroup Grids & Lists
101
+ *
102
+ * @example
103
+ * <igx-combo>
104
+ * <ng-template igxComboHeaderItem let-item let-key="groupKey">
105
+ * <div class="custom-item--group">Group header for {{ item[key] }}</div>
106
+ * </ng-template>
107
+ * </igx-combo>
41
108
*/
42
109
@Directive ( {
43
110
selector : '[igxComboHeaderItem]' ,
@@ -46,7 +113,23 @@ export class IgxComboEmptyDirective { }
46
113
export class IgxComboHeaderItemDirective { }
47
114
48
115
/**
49
- * @hidden
116
+ * Defines the custom template that will be used to display the `ADD` button
117
+ *
118
+ * @remarks To show the `ADD` button, the `allowCustomValues` option must be enabled
119
+ *
120
+ * @igxModule IgxComboModule
121
+ * @igxTheme igx-combo-theme
122
+ * @igxKeywords combobox, combo selection
123
+ * @igxGroup Grids & Lists
124
+ *
125
+ * @example
126
+ * <igx-combo #combo>
127
+ * <ng-template igxComboAddItem>
128
+ * <button class="combo__add-button">
129
+ * Click to add item
130
+ * </button>
131
+ * </ng-template>
132
+ * </igx-combo>
50
133
*/
51
134
@Directive ( {
52
135
selector : '[igxComboAddItem]' ,
@@ -55,7 +138,19 @@ export class IgxComboHeaderItemDirective { }
55
138
export class IgxComboAddItemDirective { }
56
139
57
140
/**
58
- * @hidden
141
+ * The custom template that will be used when rendering the combo's toggle button
142
+ *
143
+ * @igxModule IgxComboModule
144
+ * @igxTheme igx-combo-theme
145
+ * @igxKeywords combobox, combo selection
146
+ * @igxGroup Grids & Lists
147
+ *
148
+ * @example
149
+ * <igx-combo #combo>
150
+ * <ng-template igxComboToggleIcon let-collapsed>
151
+ * <igx-icon>{{ collapsed ? 'remove_circle' : 'remove_circle_outline'}}</igx-icon>
152
+ * </ng-template>
153
+ * </igx-combo>
59
154
*/
60
155
@Directive ( {
61
156
selector : '[igxComboToggleIcon]' ,
@@ -64,11 +159,22 @@ export class IgxComboAddItemDirective { }
64
159
export class IgxComboToggleIconDirective { }
65
160
66
161
/**
67
- * @hidden
162
+ * Defines the custom template that will be used when rendering the combo's clear icon
163
+ *
164
+ * @igxModule IgxComboModule
165
+ * @igxTheme igx-combo-theme
166
+ * @igxKeywords combobox, combo selection
167
+ * @igxGroup Grids & Lists
168
+ *
169
+ * @example
170
+ * <igx-combo #combo>
171
+ * <ng-template igxComboClearIcon>
172
+ * <igx-icon>clear</igx-icon>
173
+ * </ng-template>
174
+ * </igx-combo>
68
175
*/
69
176
@Directive ( {
70
177
selector : '[igxComboClearIcon]' ,
71
178
standalone : true
72
179
} )
73
180
export class IgxComboClearIconDirective { }
74
-
0 commit comments