Emits change event to set the model value.
()
| 316 | |
| 317 | /** Emits change event to set the model value. */ |
| 318 | private _propagateChanges(): void { |
| 319 | let valueToEmit: any = null; |
| 320 | |
| 321 | if (Array.isArray(this.selected)) { |
| 322 | valueToEmit = this.selected.map(chip => chip.value); |
| 323 | } else { |
| 324 | valueToEmit = this.selected ? this.selected.value : undefined; |
| 325 | } |
| 326 | this._value = valueToEmit; |
| 327 | this.change.emit(new MatChipListboxChange(this, valueToEmit)); |
| 328 | this._onChange(valueToEmit); |
| 329 | this._changeDetectorRef.markForCheck(); |
| 330 | } |
| 331 | |
| 332 | /** |
| 333 | * Deselects every chip in the listbox. |
no test coverage detected