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

Function focusFirstInScope

packages/react-aria/src/focus/FocusScope.tsx:558–560  ·  view source on GitHub ↗
(scope: Element[], tabbable: boolean = true)

Source from the content-addressed store, hash-verified

556}
557
558function focusFirstInScope(scope: Element[], tabbable: boolean = true) {
559 focusElement(getFirstInScope(scope, tabbable));
560}
561
562function useAutoFocus(scopeRef: RefObject<Element[] | null>, autoFocus?: boolean) {
563 const autoFocusRef = React.useRef(autoFocus);

Callers 3

onFocusFunction · 0.85
onBlurFunction · 0.85
useAutoFocusFunction · 0.85

Calls 2

focusElementFunction · 0.85
getFirstInScopeFunction · 0.85

Tested by

no test coverage detected