Skip to content

Commit c2852a9

Browse files
authored
Merge pull request #12931 from IgniteUI/bpenkov/combo-directives-api-15.1
Update combo directives' public api - 15.1.x
2 parents 6dee405 + a04c9f1 commit c2852a9

File tree

1 file changed

+115
-9
lines changed

1 file changed

+115
-9
lines changed

projects/igniteui-angular/src/lib/combo/combo.directives.ts

Lines changed: 115 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,156 @@
11
import { Directive } from '@angular/core';
22

33
/**
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>
518
*/
619
@Directive({ selector: '[igxComboHeader]' })
720
export class IgxComboHeaderDirective { }
821

922
/**
10-
* @hidden
23+
* Allows a custom element to be added at the end of the combo list.
24+
*
25+
* @igxModule IgxComboModule
26+
* @igxTheme igx-combo-theme
27+
* @igxKeywords combobox, combo selection
28+
* @igxGroup Grids & Lists
29+
*
30+
* @example
31+
* <igx-combo>
32+
* <ng-template igxComboFooter>
33+
* <div class="footer-class">Custom footer</div>
34+
* <img src=""/>
35+
* </ng-template>
36+
* </igx-combo>
1137
*/
1238
@Directive({ selector: '[igxComboFooter]' })
1339
export class IgxComboFooterDirective { }
1440

1541
/**
16-
* @hidden
42+
* Allows the combo's items to be modified with a custom template
43+
*
44+
* @igxModule IgxComboModule
45+
* @igxTheme igx-combo-theme
46+
* @igxKeywords combobox, combo selection
47+
* @igxGroup Grids & Lists
48+
*
49+
* @example
50+
* <igx-combo>
51+
* <ng-template igxComboItem let-display let-key="valueKey">
52+
* <div class="item">
53+
* <span class="state">State: {{ display[key] }}</span>
54+
* <span class="region">Region: {{ display.region }}</span>
55+
* </div>
56+
* </ng-template>
57+
* </igx-combo>
1758
*/
1859
@Directive({ selector: '[igxComboItem]' })
1960
export class IgxComboItemDirective { }
2061

2162
/**
22-
* @hidden
63+
* Defines the custom template that will be displayed when the combo's list is empty
64+
*
65+
* @igxModule IgxComboModule
66+
* @igxTheme igx-combo-theme
67+
* @igxKeywords combobox, combo selection
68+
* @igxGroup Grids & Lists
69+
*
70+
* @example
71+
* <igx-combo>
72+
* <ng-template igxComboEmpty>
73+
* <div class="combo--empty">
74+
* There are no items to display
75+
* </div>
76+
* </ng-template>
77+
* </igx-combo>
2378
*/
2479
@Directive({ selector: '[igxComboEmpty]' })
2580
export class IgxComboEmptyDirective { }
2681

2782
/**
28-
* @hidden
83+
* Defines the custom template that will be used when rendering header items for groups in the combo's list
84+
*
85+
* @igxModule IgxComboModule
86+
* @igxTheme igx-combo-theme
87+
* @igxKeywords combobox, combo selection
88+
* @igxGroup Grids & Lists
89+
*
90+
* @example
91+
* <igx-combo>
92+
* <ng-template igxComboHeaderItem let-item let-key="groupKey">
93+
* <div class="custom-item--group">Group header for {{ item[key] }}</div>
94+
* </ng-template>
95+
* </igx-combo>
2996
*/
3097
@Directive({ selector: '[igxComboHeaderItem]' })
3198
export class IgxComboHeaderItemDirective { }
3299

33100
/**
34-
* @hidden
101+
* Defines the custom template that will be used to display the `ADD` button
102+
*
103+
* @remarks To show the `ADD` button, the `allowCustomValues` option must be enabled
104+
*
105+
* @igxModule IgxComboModule
106+
* @igxTheme igx-combo-theme
107+
* @igxKeywords combobox, combo selection
108+
* @igxGroup Grids & Lists
109+
*
110+
* @example
111+
* <igx-combo #combo>
112+
* <ng-template igxComboAddItem>
113+
* <button class="combo__add-button">
114+
* Click to add item
115+
* </button>
116+
* </ng-template>
117+
* </igx-combo>
35118
*/
36119
@Directive({ selector: '[igxComboAddItem]' })
37120
export class IgxComboAddItemDirective { }
38121

39122
/**
40-
* @hidden
123+
* The custom template that will be used when rendering the combo's toggle button
124+
*
125+
* @igxModule IgxComboModule
126+
* @igxTheme igx-combo-theme
127+
* @igxKeywords combobox, combo selection
128+
* @igxGroup Grids & Lists
129+
*
130+
* @example
131+
* <igx-combo #combo>
132+
* <ng-template igxComboToggleIcon let-collapsed>
133+
* <igx-icon>{{ collapsed ? 'remove_circle' : 'remove_circle_outline'}}</igx-icon>
134+
* </ng-template>
135+
* </igx-combo>
41136
*/
42137
@Directive({ selector: '[igxComboToggleIcon]' })
43138
export class IgxComboToggleIconDirective { }
44139

45140
/**
46-
* @hidden
141+
* Defines the custom template that will be used when rendering the combo's clear icon
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 igxComboClearIcon>
151+
* <igx-icon>clear</igx-icon>
152+
* </ng-template>
153+
* </igx-combo>
47154
*/
48155
@Directive({ selector: '[igxComboClearIcon]' })
49156
export class IgxComboClearIconDirective { }
50-

0 commit comments

Comments
 (0)