12
12
< input igxInput name ="age " placeholder ="Age " />
13
13
</ igx-input-group >
14
14
</ div >
15
+ < div >
16
+ < h5 class ="sample-title "> Simple Combo in Template Form</ h5 >
17
+ < form >
18
+ < igx-simple-combo class ="input-container " [placeholder] ="'Locations' " name ="anyName "
19
+ #comboModel ="ngModel " [(ngModel)] ="singleValue " minlength ="2 " required [data] ="items "
20
+ [displayKey] ="valueKeyVar " [disabled] ="isDisabled " [valueKey] ="valueKeyVar "
21
+ [groupKey] ="valueKeyVar ? 'region' : '' " [width] ="'100%' ">
22
+ < label igxLabel > States</ label >
23
+ < igx-hint > Please select the state you've visited</ igx-hint >
24
+ </ igx-simple-combo >
25
+ </ form >
26
+ < button igxButton (click) ="values1 = values1.concat(['Missouri']) "> Add Missouri</ button >
27
+ < button igxButton (click) ="values1 = [] "> Clear values </ button >
28
+ </ div >
15
29
< div >
16
30
< h5 class ="sample-title "> Template Form</ h5 >
17
31
< form >
18
32
< igx-combo class ="input-container " [placeholder] ="'Locations' " name ="anyName " #comboModel ="ngModel "
19
- [(ngModel)] ="values1 " minlength ="2 " required
20
- [data ] ="items " [filterable ] ="filterableFlag " [displayKey ] ="valueKeyVar " [disabled] =" isDisabled "
21
- [valueKey] =" valueKeyVar " [ groupKey] ="valueKeyVar ? 'region' : '' " [width] ="'100%' ">
33
+ [(ngModel)] ="values1 " minlength ="2 " required [data] =" items " [filterable] =" filterableFlag "
34
+ [displayKey ] ="valueKeyVar " [disabled ] ="isDisabled " [valueKey ] ="valueKeyVar "
35
+ [groupKey] ="valueKeyVar ? 'region' : '' " [width] ="'100%' ">
22
36
< label igxLabel > States</ label >
23
37
< igx-hint > Please select the states you've visited</ igx-hint >
24
38
</ igx-combo >
@@ -39,13 +53,13 @@ <h5 class="sample-title">Reactive Form</h5>
39
53
</ form >
40
54
</ div >
41
55
< div class ="input-row ">
42
- < igx-combo #playgroundCombo class ="input-container " [placeholder] ="'Locations' " [showSearchCaseIcon] ='true '
43
- (addition) ="handleAddition($event) " (selectionChanging) ="handleSelectionChange($event) "
44
- [data] ="items " [allowCustomValues] ="customValuesFlag " [displayDensity] ="'comfortable' "
56
+ < igx-combo #playgroundCombo class ="input-container " [placeholder] ="'Locations' "
57
+ [showSearchCaseIcon] ='true ' (addition) ="handleAddition($event) "
58
+ (selectionChanging) ="handleSelectionChange($event) " [data] ="items "
59
+ [allowCustomValues] ="customValuesFlag " [displayDensity] ="'comfortable' "
45
60
[autoFocusSearch] ="autoFocusSearch " [filterable] ="filterableFlag " [displayKey] ="valueKeyVar "
46
61
[valueKey] ="valueKeyVar " [groupKey] ="valueKeyVar ? 'region' : '' " [width] ="'100%' ">
47
- < ng-template *ngIf ="currentDataType !== 'primitive' " #itemTemplate let-display
48
- let-key ="valueKey ">
62
+ < ng-template *ngIf ="currentDataType !== 'primitive' " #itemTemplate let-display let-key ="valueKey ">
49
63
< div class ="state-card--simple ">
50
64
< div class ="display-value--main "> {{display[key]}}</ div >
51
65
< div class ="display-value--sub "> {{display.region}}</ div >
@@ -63,7 +77,8 @@ <h5 class="sample-title">Reactive Form</h5>
63
77
< ng-template igxComboFooter >
64
78
< div class ="custom-combo-footer "> This is a footer</ div >
65
79
</ ng-template >
66
- < ng-template *ngIf ="currentDataType !== 'primitive' " #headerItemTemplate let-display let-key ="groupKey ">
80
+ < ng-template *ngIf ="currentDataType !== 'primitive' " #headerItemTemplate let-display
81
+ let-key ="groupKey ">
67
82
< div > Group header for {{display[key]}}</ div >
68
83
</ ng-template >
69
84
< ng-template igxComboAddItem >
@@ -111,7 +126,7 @@ <h4>Display Density</h4>
111
126
< div >
112
127
< igx-buttongroup >
113
128
< button igxButton [disabled] ="igxCombo.displayDensity === compact "
114
- (click) ="setDensity('compact') "> Compact</ button >
129
+ (click) ="setDensity('compact') "> Compact</ button >
115
130
< button igxButton [disabled] ="igxCombo.displayDensity === cosy "
116
131
(click) ="setDensity('cosy') "> Cosy</ button >
117
132
< button igxButton [disabled] ="igxCombo.displayDensity === comfortable "
@@ -122,8 +137,8 @@ <h4>Item Height</h4>
122
137
< div >
123
138
< igx-buttongroup >
124
139
< button igxButton [disabled] ="playgroundCombo.itemHeight === 56 "
125
- (click) ="playgroundCombo.itemHeight = 56 ">
126
- Set ItemHeight to 56
140
+ (click) ="playgroundCombo.itemHeight = 56 ">
141
+ Set ItemHeight to 56
127
142
</ button >
128
143
< button igxButton [disabled] ="playgroundCombo.itemHeight === null "
129
144
(click) ="playgroundCombo.itemHeight = null ">
0 commit comments