Skip to content
  • v5.0.0
  • a30c83a
  • Compare
    Choose a tag to compare
    Search for a tag
  • v5.0.0
  • a30c83a
  • Compare
    Choose a tag to compare
    Search for a tag

@silviuavram silviuavram released this Feb 10, 2020 · 7 commits to master since this release

5.0.0 (2020-02-10)

BREAKING CHANGES

  • 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 renaming keysSoFar with inputValue.

To migrate to the new change, simply check for FunctionSetInputValue with empty string as inputValue instead of checking for FunctionClearKeysSoFar in stateReducer.

  • Both getA11yStatusMessage and getA11ySelectionMessage will be called with the same props as the getA11yStatusMessage in <Downshift>, apart from previousResultCount. 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 and useCombobox, if you used items as parameters in any of the a11y message functions, now you should use resultCount as probably you only needed items.length from it anyway.

Also typings UseSelectA11yMessageOptions and UseComboboxA11yMessageOptions have been removed. Use A11yStatusMessageOptions instead.

Code Changes: tests have been enhanced by using user input from RTL 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 and useCombobox.

Fixes #832.
Closes #892
Closes #891
Closes #873

Assets 2
You can’t perform that action at this time.