()
| 197 | override _chips: QueryList<MatChipOption> = undefined!; |
| 198 | |
| 199 | ngAfterContentInit() { |
| 200 | this._chips.changes.pipe(startWith(null), takeUntil(this._destroyed)).subscribe(() => { |
| 201 | if (this.value !== undefined) { |
| 202 | Promise.resolve().then(() => { |
| 203 | this._setSelectionByValue(this.value, false); |
| 204 | }); |
| 205 | } |
| 206 | // Update listbox selectable/multiple properties on chips |
| 207 | this._syncListboxProperties(); |
| 208 | }); |
| 209 | |
| 210 | this.chipBlurChanges.pipe(takeUntil(this._destroyed)).subscribe(() => this._blur()); |
| 211 | this.chipSelectionChanges.pipe(takeUntil(this._destroyed)).subscribe(event => { |
| 212 | if (!this.multiple) { |
| 213 | this._chips.forEach(chip => { |
| 214 | if (chip !== event.source) { |
| 215 | chip._setSelectedState(false, false, false); |
| 216 | } |
| 217 | }); |
| 218 | } |
| 219 | |
| 220 | if (event.isUserInput) { |
| 221 | this._propagateChanges(); |
| 222 | } |
| 223 | }); |
| 224 | } |
| 225 | |
| 226 | /** |
| 227 | * Focuses the first selected chip in this chip listbox, or the first non-disabled chip when there |
nothing calls this directly
no test coverage detected