Listens to changes in the chip set and syncs up the state of the individual chips.
()
| 268 | |
| 269 | /** Listens to changes in the chip set and syncs up the state of the individual chips. */ |
| 270 | private _trackChipSetChanges() { |
| 271 | this._chips.changes.pipe(startWith(null), takeUntil(this._destroyed)).subscribe(() => { |
| 272 | if (this.disabled) { |
| 273 | // Since this happens after the content has been |
| 274 | // checked, we need to defer it to the next tick. |
| 275 | Promise.resolve().then(() => this._syncChipsState()); |
| 276 | } |
| 277 | |
| 278 | this._redirectDestroyedChipFocus(); |
| 279 | }); |
| 280 | } |
| 281 | |
| 282 | /** Starts tracking the destroyed chips in order to capture the focused one. */ |
| 283 | private _trackDestroyedFocusedChip() { |
no test coverage detected