Function
asOption
(val: OnChangeValue<Option, IsMulti>)
Source from the content-addressed store, hash-verified
| 85 | } = ariaSelection; |
| 86 | // select-option when !isMulti does not return option so we assume selected option is value |
| 87 | const asOption = (val: OnChangeValue<Option, IsMulti>): Option | null => |
| 88 | !Array.isArray(val) ? (val as Option) : null; |
| 89 | |
| 90 | // If there is just one item from the action then get its label |
| 91 | const selected = removedValue || option || asOption(value); |
Tested by
no test coverage detected