MCPcopy Index your code
hub / github.com/adobe/react-spectrum / convertValue

Function convertValue

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

Source from the content-addressed store, hash-verified

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

Callers 1

useSelectStateFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected