File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -329,10 +329,7 @@ export class MatChipList
329
329
}
330
330
set selectable ( value : BooleanInput ) {
331
331
this . _selectable = coerceBooleanProperty ( value ) ;
332
-
333
- if ( this . chips ) {
334
- this . chips . forEach ( chip => ( chip . chipListSelectable = this . _selectable ) ) ;
335
- }
332
+ this . _syncChipsState ( ) ;
336
333
}
337
334
protected _selectable : boolean = true ;
338
335
@@ -414,7 +411,7 @@ export class MatChipList
414
411
415
412
// When the list changes, re-subscribe
416
413
this . chips . changes . pipe ( startWith ( null ) , takeUntil ( this . _destroyed ) ) . subscribe ( ( ) => {
417
- if ( this . disabled ) {
414
+ if ( this . disabled || ! this . selectable ) {
418
415
// Since this happens after the content has been
419
416
// checked, we need to defer it to the next tick.
420
417
Promise . resolve ( ) . then ( ( ) => {
@@ -844,6 +841,7 @@ export class MatChipList
844
841
this . chips . forEach ( chip => {
845
842
chip . _chipListDisabled = this . _disabled ;
846
843
chip . _chipListMultiple = this . multiple ;
844
+ chip . chipListSelectable = this . _selectable ;
847
845
} ) ;
848
846
}
849
847
}
You can’t perform that action at this time.
0 commit comments