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

Function focusFirstInScope

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

Source from the content-addressed store, hash-verified

557}
558
559function focusFirstInScope(scope: Element[], tabbable: boolean = true) {
560 focusElement(getFirstInScope(scope, tabbable));
561}
562
563function useAutoFocus(scopeRef: RefObject<Element[] | null>, autoFocus?: boolean) {
564 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