-
Notifications
You must be signed in to change notification settings - Fork 929
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
downshift v5 #907
downshift v5 #907
Conversation
8b9f103
to
0ba42ac
Compare
Codecov Report
@@ Coverage Diff @@
## master #907 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 12 13 +1
Lines 950 1019 +69
Branches 190 199 +9
=====================================
+ Hits 950 1019 +69
Continue to review full report at Codecov.
|
9bdb986
to
29aea73
Compare
Unfortunately, keeping focus on the That being said, most changes in this PR are still relevant. To move forward, we will add the aria attributes and handlers back to the list, move the tests back, add the Menu stateChangeTypes back etc. |
ec5d3ee
to
2a1ff5e
Compare
32f99ac
to
de4b2b4
Compare
de4b2b4
to
971e011
Compare
🎉 This PR is included in version 5.0.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Contains refactoring, test improvements, bug fixes.
BREAKING CHANGE: Removed
FunctionClearKeysSoFar
from state change types and TS typings. In useSelect, once the timeout for keeping the character keys in memory has expired,FunctionSetInputValue
will be used. We are doing this as we are renamingkeysSoFar
withinputValue
.To migrate to the new change, simply check for
FunctionSetInputValue
with empty string asinputValue
instead of checking forFunctionClearKeysSoFar
instateReducer
.BREAKING CHANGE: Both
getA11yStatusMessage
andgetA11ySelectionMessage
will be called with the same props as thegetA11yStatusMessage
in<Downshift>
, apart frompreviousResultCount
. In the TS typings it's now marked as optional, and all functions have the same interface definition,A11yStatusMessageOptions
.To migrate to the new changes, in
useSelect
anduseCombobox
, if you useditems
as parameters in any of the a11y message functions, now you should useresultCount
as probably you only neededitems.length
from it anyway.Also typings
UseSelectA11yMessageOptions
andUseComboboxA11yMessageOptions
have been removed. UseA11yStatusMessageOptions
instead.Code Changes: tests have been enhanced by using
user input
fromRTL
and they now look better and cleaner. Also covered more use cases better. Code has been refactored as well, and bundle size slightly reduced.Functional Improvement: better focus management for both
useSelect
anduseCombobox
.Fixes #832.
Closes #892
Closes #891
Closes #873