useFocusFromOpened
function useFocusFromOpened(element, isOpen): void;
Use this hook to set the focus point on an element when something becomes opened, e.g. set focus on a panel container or menu container when it becomes visible so that the next time the user hits on the tab key the element that becomes focused on is potentially a tabbable element inside the container element.
Parameters
| Parameter | Type | Description |
|---|---|---|
element | null | HTMLElement | element which focus point should start from |
isOpen | boolean | when isOpen is true the element will get the focus point |
Returns
void