This repository has been archived by the owner on Oct 8, 2023. It is now read-only.
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.
This PR contains the following updates:
^6.1.12
->^8.2.2
Release Notes
downshift-js/downshift (downshift)
v8.2.2
Compare Source
Bug Fixes
v8.2.1
Compare Source
Bug Fixes
v8.2.0
Compare Source
Features
v8.1.1
Compare Source
Bug Fixes
v8.1.0
Compare Source
Features
v8.0.2
Compare Source
Bug Fixes
v8.0.1
Compare Source
Bug Fixes
v8.0.0
Compare Source
Features
BREAKING CHANGES
PRs included:
https://github.com/downshift-js/downshift/pull/1440
https://github.com/downshift-js/downshift/pull/1445
https://github.com/downshift-js/downshift/pull/1463
https://github.com/downshift-js/downshift/pull/1510
https://github.com/downshift-js/downshift/pull/1482
Changes
These changes will also be covered in the V8 migration guide.
isItemDisabled
Both
useCombobox
anduseSelect
now support theisItemDisabled
function. This new API is used to mark menu items as disabled, and as such remove the from the navigation and prevent them from being selected. The old API required passing thedisabled
prop to thegetItemProps
function. This old API has been removed and you will receive a console warning if you are trying to use thedisabled
prop in getItemProps.Example of API migration:
Old:
New:
The API for Downshift remains unchange.
useCombobox input click
ARIA 1.2 recommends to toggle the menu open state at input click. Previously, in v7, the menu was opened on receiving focus, from both mouse and keyboard. Starting with v8, input focus will not trigger any state change anymore. Only the input click event will be handled and will trigger a menu toggle. Consequently:
useCombobox.stateChangeTypes.InputFocus
has been removed.useCombobox.stateChangeTypes.InputClick
has been added instead.We recommend having the default toggle on input click behaviour as it's part of the official ARIA combobox 1.2 spec, but if you wish to override it and not toggle the menu on click, use the stateReducer:
If you want to return to the v7 behaviour and open the menu on focus, keep the reducer above so you remove the toggle behaviour, and call the openMenu imperative function, returned by useCombobox, in a onFocus handler passed to
getInputProps:
Consider to use the default 1.2 ARIA behaviour provided by default in order to align your widget to the accessibility official spec. This behaviour consistency improves the user experience, since all comboboxes should behave the same and
there won't be need for any additional guess work done by your users.
Getter props return value types
Previously, the return value from the getter props returned by both Downshift and the hooks was
any
. In v8 we improved the types in order to reflect what is actually returned: the default values return by the getter prop function andwhatever else the user passes as arguments. The type changes are done in this PR, make sure you adapt your TS code, if applicable.
Also, in the
Downshift
component, the return values for some getter prop values have changed fromnull
toundefined
, since that is what HTML elements expect (value or undefined). These values are also reflected in the TS types.nullundefined,nullundefinedhighlightedIndex >= 0 ? this.getItemId(highlightedIndex) :
nullundefinednullundefined : this.labelId,environment propTypes
The
environment
prop is useful when you are using downshift in a contextdifferent than regular DOM. Its TS type has been updated to contain
Node
andthe propTypes have also been updated to reflect the properties which are
required by downshift from
environment
.v7.6.2
Compare Source
Bug Fixes
v7.6.1
Compare Source
Bug Fixes
v7.6.0
Compare Source
v7.5.0
Compare Source
v7.4.1
Compare Source
Bug Fixes
v7.4.0
Compare Source
Features
v7.3.4
Compare Source
Bug Fixes
v7.3.3
Compare Source
Bug Fixes
v7.3.2
Compare Source
Bug Fixes
v7.3.1
Compare Source
Bug Fixes
v7.3.0
Compare Source
Features
v7.2.2
Compare Source
Bug Fixes
v7.2.1
Compare Source
Bug Fixes
v7.2.0
Compare Source
Features
v7.1.2
Compare Source
v7.1.1
Compare Source
v7.1.0
Compare Source
Features
v7.0.5
Compare Source
Bug Fixes
v7.0.4
Compare Source
Bug Fixes
v7.0.3
Compare Source
Bug Fixes
v7.0.1
Compare Source
Bug Fixes
v7.0.0
Compare Source
Features
BREAKING CHANGES
Migration guide is available in this file.
Closes https://github.com/downshift-js/downshift/issues/1365.
Closes https://github.com/downshift-js/downshift/issues/1239.
Contains changes from https://github.com/downshift-js/downshift/pull/1149.
Configuration
📅 Schedule: Branch creation - "before 7am on Tuesday,before 7am on Wednesday" in timezone Australia/Melbourne, Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.