useContainsFocus
Datalayer Core / useContainsFocus
Function: useContainsFocus()
useContainsFocus<
T>(containerRef?,onFocusChange?):void
Defined in: src/hooks/useContainsFocus.ts:15
Determine if a child element of the provided ref is currently focussed.
Type Parameters
T
T extends HTMLElement
Parameters
containerRef?
RefObject<T>
The ref to the container element.
onFocusChange?
(isFocussed) => void
The callback to be called when the focus state changes.
Returns
void
The ref to be applied to the container element.