focus-trap-react
Advanced tools
Changelog
8.2.0
Changelog
8.1.1
^16.0.0
to >=16.0.0
since this library works with React 17 as well as React 16.active
prop to false
. #139Changelog
8.1.0
delayInitialFocus
flag that can be used to further customize trap behavior.prepublishOnly
script to prepare
script so that it also runs if someone installs the package directly from the git repo (e.g. from your work in which you fixed a bug or added a feature you're waiting to get merged to master and published to NPM).Changelog
8.0.0
Changelog
7.0.0
<FocusTrap>
.focus-trap
dependency from 4.0.2 to 5.1.0 for the latest features/fixes it provides. #71children
's type is React.ReactNode
, not React.ReactElement
. #66specifiedFocusTrapOptions.includes(optionName)
statement in componentDidMount()
was causing an exception because includes()
is not a function defined on Object
.Changelog
6.0.0
Changelog
5.0.0
<FocusTrap>
now expects exactly one child element which can be any HTML element or other React component that contains focusable elements. The tag
prop has been removed, as has support for additional props that are passed through to the tag
, because it is no longer necessary: you should provide your own element, with whatever props you want, as a child of <FocusTrap>
.Changelog
4.0.1
returnFocusOnDeactivate: true
to be ignored when using the active
prop to activate & deactivate the focus trap.