FocusTrapHookSettings
Datalayer Core / FocusTrapHookSettings
Interface: FocusTrapHookSettings
Defined in: tech/datalayer/core/src/hooks/useFocusTrap.ts:9
Properties
containerRef
containerRef:
RefObject
<HTMLElement
>
Defined in: tech/datalayer/core/src/hooks/useFocusTrap.ts:14
Ref that will be used for the trapping container. If not provided, one will be created by this hook and returned.
disabled?
optional
disabled:boolean
Defined in: tech/datalayer/core/src/hooks/useFocusTrap.ts:25
Set to true to disable the focus trap and clean up listeners. Can be re-enabled at any time.
initialFocusRef?
optional
initialFocusRef:RefObject
<HTMLElement
>
Defined in: tech/datalayer/core/src/hooks/useFocusTrap.ts:20
Ref for the element that should receive focus when the focus trap is first enabled. If not provided, one will be created by this hook and returned. Its use is optional.
restoreFocusOnCleanUp?
optional
restoreFocusOnCleanUp:boolean
Defined in: tech/datalayer/core/src/hooks/useFocusTrap.ts:30
If true, when this focus trap is cleaned up, restore focus to the element that had focus immediately before the focus trap was enabled. (Default: false)