The value displayed in the trigger.
()
| 863 | |
| 864 | /** The value displayed in the trigger. */ |
| 865 | get triggerValue(): string { |
| 866 | if (this.empty) { |
| 867 | return ''; |
| 868 | } |
| 869 | |
| 870 | if (this._multiple) { |
| 871 | const selectedOptions = this._selectionModel.selected.map(option => option.viewValue); |
| 872 | |
| 873 | if (this._isRtl()) { |
| 874 | selectedOptions.reverse(); |
| 875 | } |
| 876 | |
| 877 | // TODO(crisbeto): delimiter should be configurable for proper localization. |
| 878 | return selectedOptions.join(', '); |
| 879 | } |
| 880 | |
| 881 | return this._selectionModel.selected[0].viewValue; |
| 882 | } |
| 883 | |
| 884 | /** Refreshes the error state of the select. */ |
| 885 | updateErrorState() { |