@@ -225,6 +225,74 @@ <h4>Options</h4>
225225 </ mat-card-content >
226226 </ mat-card >
227227
228+ < mat-card >
229+ < mat-toolbar color ="primary "> Disabled Input Chips</ mat-toolbar >
230+
231+ < mat-card-content >
232+ < p >
233+ The < code > <mat-chip-grid></ code > component pairs with the < code > matChipInputFor</ code > directive
234+ to convert user input text into chips.
235+ They can be used inside a < code > <mat-form-field></ code > .
236+ </ p >
237+
238+ < h4 > Input is last child of chip grid</ h4 >
239+
240+ < mat-form-field class ="demo-has-chip-list ">
241+ < mat-label > New Contributor...</ mat-label >
242+ < mat-chip-grid #chipGrid1 [(ngModel)] ="selectedPeople " required >
243+ @for (person of people; track person) {
244+ < mat-chip-row
245+ [disabled] ="true "
246+ [editable] ="editable "
247+ (removed) ="remove(person) "
248+ (edited) ="edit(person, $event) ">
249+ {{person.name}}
250+ < button matChipRemove aria-label ="Remove contributor ">
251+ < mat-icon > close</ mat-icon >
252+ </ button >
253+ </ mat-chip-row >
254+ }
255+ < input
256+ [matChipInputFor] ="chipGrid1 "
257+ [matChipInputSeparatorKeyCodes] ="separatorKeysCodes "
258+ [matChipInputAddOnBlur] ="addOnBlur "
259+ (matChipInputTokenEnd) ="add($event) " />
260+ </ mat-chip-grid >
261+ </ mat-form-field >
262+
263+ < h4 > Input is next sibling child of chip grid</ h4 >
264+
265+ < mat-form-field >
266+ < mat-label > New Contributor...</ mat-label >
267+ < mat-chip-grid #chipGrid2 [(ngModel)] ="selectedPeople " required >
268+ @for (person of people; track person) {
269+ < mat-chip-row disabled (removed) ="remove(person) ">
270+ {{person.name}}
271+ < button matChipRemove aria-label ="Remove contributor ">
272+ < mat-icon > close</ mat-icon >
273+ </ button >
274+ </ mat-chip-row >
275+ }
276+ </ mat-chip-grid >
277+ < input [matChipInputFor] ="chipGrid2 "
278+ [matChipInputSeparatorKeyCodes] ="separatorKeysCodes "
279+ [matChipInputAddOnBlur] ="addOnBlur "
280+ (matChipInputTokenEnd) ="add($event) " />
281+ </ mat-form-field >
282+
283+ < p >
284+ The example above has overridden the < code > [separatorKeys]</ code > input to allow for
285+ < code > ENTER</ code > , < code > COMMA</ code > and < code > SEMICOLON</ code > keys.
286+ </ p >
287+
288+ < h4 > Options</ h4 >
289+ < p >
290+ < mat-checkbox name ="addOnBlur " [(ngModel)] ="addOnBlur "> Add on Blur</ mat-checkbox >
291+ </ p >
292+
293+ </ mat-card-content >
294+ </ mat-card >
295+
228296 < mat-card >
229297 < mat-toolbar color ="primary "> Miscellaneous</ mat-toolbar >
230298 < mat-card-content >
0 commit comments