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

Function useFocusableRef

packages/@react-spectrum/s2/src/useDOMRef.ts:49–56  ·  view source on GitHub ↗
(
  ref: FocusableRef<T, D>,
  focusableRef?: RefObject<T | null>
)

Source from the content-addressed store, hash-verified

47}
48
49export function useFocusableRef<T extends HTMLElement = HTMLElement, D extends HTMLElement = T>(
50 ref: FocusableRef<T, D>,
51 focusableRef?: RefObject<T | null>
52): RefObject<D | null> {
53 let domRef = useRef<D>(null);
54 useImperativeHandle(ref, () => createFocusableRef<T, D>(domRef, focusableRef));
55 return domRef;
56}
57
58export function unwrapDOMRef<T extends HTMLElement>(
59 ref: RefObject<DOMRefValue<T> | null>

Callers 15

MainFunction · 0.90
NavigationFunction · 0.90
RegionFunction · 0.90
MainFunction · 0.90
NavigationFunction · 0.90
RegionFunction · 0.90
SearchFunction · 0.90
Button.tsxFile · 0.90
Link.tsxFile · 0.90
Slider.tsxFile · 0.90
PickerFunction · 0.90
RadioGroup.tsxFile · 0.90

Calls 1

createFocusableRefFunction · 0.70

Tested by 3

MainFunction · 0.72
NavigationFunction · 0.72
RegionFunction · 0.72