Assigns a specific value to the select. Returns whether the value has changed.
(newValue: any | any[])
| 1097 | |
| 1098 | /** Assigns a specific value to the select. Returns whether the value has changed. */ |
| 1099 | private _assignValue(newValue: any | any[]): boolean { |
| 1100 | // Always re-assign an array, because it might have been mutated. |
| 1101 | if (newValue !== this._value || (this._multiple && Array.isArray(newValue))) { |
| 1102 | if (this.options) { |
| 1103 | this._setSelectionByValue(newValue); |
| 1104 | } |
| 1105 | |
| 1106 | this._value = newValue; |
| 1107 | return true; |
| 1108 | } |
| 1109 | return false; |
| 1110 | } |
| 1111 | |
| 1112 | // `skipPredicate` determines if key manager should avoid putting a given option in the tab |
| 1113 | // order. Allow disabled list items to receive focus via keyboard to align with WAI ARIA |
no test coverage detected