fix(props): Upgrade focus-trap
to fix initialFocus
prop types
#390
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
focus-trap
library was updated in version 6.7.0 to fix anissue with the type used for the
initialFocus
option where passingfalse
or a function that returnsfalse
was not allowed.The relevant release is tagged here:
https://github.com/focus-trap/focus-trap/releases/tag/v6.7.0
Updating the type to include the Boolean constructor will allow
users of the Vue component to pass the
false
literal for the:initial-focus
prop. A function returningfalse
already passedthe Vue type check but in previous versions of
focus-trap
wouldraise an error. This was also fixed in 6.7.0:
focus-trap/focus-trap@14b0ee8#diff-a3ce29c1c993dbf3f968461bb3ff5e3f522d8b0c94cc2ca8f6b3ef7a9eda3621R209-R212
Updating the peer and dev dependencies to be at least 6.7.0
allows
vue-focus-trap
to have the correct behavior and typesand to match the latest documentation for the
focus-trap
library.