Releases: focus-trap/focus-trap-react
Releases · focus-trap/focus-trap-react
v8.6.0
Minor Changes
- 5292ae8:
- Adding support for new focus-trap options from focus-trap v6.5.0:
checkCanFocusTrap()
,onPostActivate()
,checkCanReturnFocus()
, andonPostDeactivate()
. - Adding support (bug fix) for existing focus-trap
setReturnFocus
option that had thus far been ignored, with focus-trap-react always returning focus to the previously-focused element prior to activation regardless of the use of thesetReturnFocus
option. The option is now respected the same as it is when using focus-trap directly.
- Adding support for new focus-trap options from focus-trap v6.5.0:
Patch Changes
- 24704c7: Bump focus-trap dependency to 6.5.1 for bug fix to onPostDeactivate.
v8.5.1
v8.5.0
v8.4.2
v8.4.1
v8.4.0
v8.3.2
v8.3.1
v8.3.0
Minor Changes
- c4e4837: Remove the need for a child, update typings, update docs:
- Remove the need for a child in
<FocusTrap />
whencontainerElements
is used. The child was already being ignored anyway (whencontainerElements
is used; if the prop is not used, then a single child is still required). - Update the typings related to the
children
prop to make it optional. Prop-types already hadchildren
as optional, however the use ofReact.Children.only()
in all cases was still forcing the presence of a single child. That's no longer the case. - Add additional notes about the use of the
containerElements
prop in the documentation.
- Remove the need for a child in
Patch Changes
v8.2.0
Minor Changes
- 76ed007: Add ability to pass containerElements to focus-trap #179. This PR is made possible because of focus-trap/focus-trap#217 and the released version 6.2.0 of focus-trap.