* Set the selected state of all options. * @param isSelected The new selected state to set
(isSelected: boolean)
| 549 | * @param isSelected The new selected state to set |
| 550 | */ |
| 551 | setAllSelected(isSelected: boolean) { |
| 552 | if (!isSelected) { |
| 553 | this.selectionModel.clear(); |
| 554 | } else { |
| 555 | if (this._invalid) { |
| 556 | this.selectionModel.clear(false); |
| 557 | } |
| 558 | this.selectionModel.select(...this.options.map(option => option.value)); |
| 559 | } |
| 560 | } |
| 561 | |
| 562 | /** |
| 563 | * Get whether the given option is selected. |
no test coverage detected