MCPcopy Index your code
hub / github.com/angular/components / triggerValue

Method triggerValue

src/material/select/select.ts:865–882  ·  view source on GitHub ↗

The value displayed in the trigger.

()

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls 1

_isRtlMethod · 0.95

Tested by

no test coverage detected