FocusWithin
Update your component styles or layout using a focus within component.
Examples
Usage
Focus within handles the onFocus
and onBlur
calls and re-renders children whenever the focus status changes.
APIs
IFocusWithin
hasFocus
() => boolean
IFocusWithinEvents
onBluroptional
() => void
onFocusoptional
(event: React.FocusEvent<HTMLElement>) => void
IFocusWithinProps
onBlurInherited From: IFocusWithinEvents
() => void
onFocusInherited From: IFocusWithinEvents
(event: React.FocusEvent<HTMLElement>) => void
updateStateOnFocusChange
boolean
If updateStateOnFocusChange is set to true, the FocusWithin component will update
the state of the component and cause a re-render of the sub-tree when focus enters
of leaves the component.
IFocusWithinStatus
hasFocus
boolean
onBluroptionalInherited From: IFocusWithinEvents
() => void
onFocusoptionalInherited From: IFocusWithinEvents
(event: React.FocusEvent<HTMLElement>) => void