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

Function getText

packages/react-aria/src/dnd/useDropIndicator.ts:57–63  ·  view source on GitHub ↗
(key: Key | null)

Source from the content-addressed store, hash-verified

55 let {dropProps} = useDroppableItem(props, state, ref);
56 let id = useId();
57 let getText = (key: Key | null) => {
58 if (key == null) {
59 return '';
60 } else {
61 return collection.getTextValue?.(key) ?? collection.getItem(key)?.textValue ?? '';
62 }
63 };
64
65 let label = '';
66 let labelledBy: string | undefined;

Callers 1

useDropIndicatorFunction · 0.70

Calls 2

getTextValueMethod · 0.65
getItemMethod · 0.65

Tested by

no test coverage detected