MCPcopy Create free account
hub / github.com/adobe/react-spectrum / convertValue

Function convertValue

packages/react-stately/src/select/useSelectState.ts:273–281  ·  view source on GitHub ↗
(value: Key | Key[] | null | undefined)

Source from the content-addressed store, hash-verified

271}
272
273function convertValue(value: Key | Key[] | null | undefined) {
274 if (value === undefined) {
275 return undefined;
276 }
277 if (value === null) {
278 return [];
279 }
280 return Array.isArray(value) ? value : [value];
281}

Callers 1

useSelectStateFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected