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

Function update

packages/react-aria/src/focus/useHasTabbableChild.ts:41–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

39 useLayoutEffect(() => {
40 if (ref?.current && !isDisabled) {
41 let update = () => {
42 if (ref.current) {
43 let walker = getFocusableTreeWalker(ref.current, {tabbable: true});
44 setHasTabbableChild(!!walker.nextNode());
45 }
46 };
47
48 update();
49

Callers 2

useHasTabbableChildFunction · 0.70

Calls 2

getFocusableTreeWalkerFunction · 0.90
nextNodeMethod · 0.80

Tested by

no test coverage detected