Skip to content

chore(deps): update dependency downshift to v6#150

Open
renovate[bot] wants to merge 1 commit intomasterfrom
renovate/downshift-6.x
Open

chore(deps): update dependency downshift to v6#150
renovate[bot] wants to merge 1 commit intomasterfrom
renovate/downshift-6.x

Conversation

@renovate
Copy link
Copy Markdown

@renovate renovate bot commented Jul 21, 2020

This PR contains the following updates:

Package Type Update Change
downshift dependencies major ^2.0.19 -> ^6.0.0

Release Notes

downshift-js/downshift

v6.0.5

Compare Source

Performance Improvements

v6.0.4

Compare Source

Bug Fixes

v6.0.3

Compare Source

Bug Fixes

v6.0.2

Compare Source

Bug Fixes

v6.0.1

Compare Source

Bug Fixes

v6.0.0

Compare Source

BREAKING CHANGES
  • Update TS typings for selectedItem to accept null in both useSelect and useCombobox.

To migrate to the new change, update your types or code if necessary. selectedItem, defaultSelectedItem and initialSelectedItem now have Item | null instead of Item type. PR with the changes: #​1090

  • Update TS typings for itemToString to accept null for the item parameter, in useSelect and useCombobox + in Downshift where this was missing. useMultipleSelection type for itemToString stays the same as it can't receive null as item.

To migrate to the new change, update your types or code if necessary. itemToString: (item: Item) => string -> itemToString: (item: Item | null) => string}. PR with the changes: #​1075 #​1105

  • Pass type to the onChange (onInputValueChange, onHighlightedIndexChange, onSelectedItemChange, onIsOpenChange) handler parameters, as specified in the documentation. Also updated the TS typings to reflect this + onStateChange - the type parameter was passed but it was not reflected in the TS types.

To migrate to the new change, update your types or code if necessary, better to view the changes in the PR: #​985. Important: please update to the 6.0.2 version since it contains a couple of fixes for the changes in this Breaking Change. Final changes:

  stateReducer?: (
    state: UseComboboxState<Item>,
    actionAndChanges: UseComboboxStateChangeOptions<Item>, // UseComboboxStateChangeOptions has the correct typings
  ) => Partial<UseComboboxState<Item>> // this now reflects the correct return, which is the partial state.
  onSelectedItemChange?: (changes: UseComboboxStateChange<Item>) => void // changes have partial state + type
  onIsOpenChange?: (changes: UseComboboxStateChange<Item>) => void 
  onHighlightedIndexChange?: (changes: UseComboboxStateChange<Item>) => void
  onStateChange?: (changes: UseComboboxStateChange<Item>) => void
  onInputValueChange?: (changes: UseComboboxStateChange<Item>) => void

where

export interface UseComboboxStateChangeOptions<Item>
  extends UseComboboxDispatchAction<Item> { // type and optional parameters needed to compute the next state
  changes: Partial<UseComboboxState<Item>> // partial state changes proposed by the hook
}

export interface UseComboboxDispatchAction<Item> {
  type: UseComboboxStateChangeTypes
  shiftKey?: boolean
  getItemNodeFromIndex?: (index: number) => HTMLElement
  inputValue?: string
  index?: number
  highlightedIndex?: number
  selectedItem?: Item | null
  selectItem?: boolean
}

export interface UseComboboxStateChange<Item>
  extends Partial<UseComboboxState<Item>> {
  type: UseComboboxStateChangeTypes
}
BREAKING BEHAVIOURS
  • [useCombobox]: When an item is highlighted by keyboard and user closes the menu using mouse/touch, the item is not selected anymore. The only selection on Blur happens using either Tab / Shift+Tab. PR with the changes: #​1109

  • [useCombobox & downshift]: When pressing Escape and the menu is open, only close the menu. When the menu is closed and there is an item selected and/or text in the input, clear the selectedItem and the inputValue. PR with the changes: #​719

v5.4.7

Compare Source

Bug Fixes
  • useSelect: ensure the initial selected item is scrolled into view on first open (#​1113) (d7bf498)

v5.4.6

Compare Source

Bug Fixes
  • useCombobox: fix onSelectedItemChange not triggering with controlled selectedItem in React.StrictMode (#​1107) (5353265)

v5.4.5

Compare Source

Bug Fixes

v5.4.4

Compare Source

Bug Fixes
  • useCombobox: navigating up if all items are disabled (#​1087) (a71005b)

v5.4.3

Compare Source

Bug Fixes

v5.4.2

Compare Source

Bug Fixes
  • useCombobox: update inputValue when calling selectItem (#​1055) (52aad04)

v5.4.1

Compare Source

Bug Fixes

v5.4.0

Compare Source

Features

v5.3.0

Compare Source

Features

v5.2.7

Compare Source

Bug Fixes

v5.2.6

Compare Source

Bug Fixes

v5.2.5

Compare Source

Performance Improvements

v5.2.4

Compare Source

Bug Fixes

v5.2.3

Compare Source

Bug Fixes

v5.2.2

Compare Source

Bug Fixes
  • useSelect: don't trigger blur state change after item selection (#​1016) (dff18c0)

v5.2.1

Compare Source

Bug Fixes

v5.2.0

Compare Source

Features
  • hooks: align behavior of a11y status messages between hooks and Downshift (#​1004) (5525e98)

v5.1.1

Compare Source

Bug Fixes
  • useMultipleSelection: replace item with selectedItem in typings for getSelectedItemProps (#​1002) (5ad8864)

v5.1.0

Compare Source

Features

v5.0.7

Compare Source

Bug Fixes

v5.0.6

Compare Source

Bug Fixes
  • typescript: add missing scrollIntoView definitions to hooks (#​983) (75b2fb6)

v5.0.5

Compare Source

Bug Fixes
  • hooks: replace Object.entries with Object.keys to support > IE 9 (#​971) (536bebc)

v5.0.4

Compare Source

Bug Fixes
  • hooks: call onStateChange with type and only changed props (#​967) (f6a7913)

v5.0.3

Compare Source

Bug Fixes
  • hooks: only add aria-activedescendant when menu is open (#​945) (28cdc02)

v5.0.2

Compare Source

Bug Fixes

v5.0.1

Compare Source

Bug Fixes
  • useCombobox: dispatch ToggleButtonClick before focusing input (#​942) (26d426e)

v5.0.0

Compare Source

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

v4.1.0

Compare Source

Features
  • hooks: add aria-selected="false" to each non-highlighted item (#​929) (860da10)

v4.0.11

Compare Source

Bug Fixes

v4.0.10

Compare Source

Bug Fixes
  • useSelect: dispatch closure issue on search by key (#​923) (653dbfd)

v4.0.9

Compare Source

Bug Fixes

v4.0.8

Compare Source

Bug Fixes
  • useEnhancedReducer: call onChange callbacks outside the reducer (#​912) (221d50d)

v4.0.7

Compare Source

Bug Fixes

v4.0.6

Compare Source

Bug Fixes
  • useSelect: correct typings for toggleButton and menu getter props (#​896) (37f41ce)

v4.0.5

Compare Source

Bug Fixes
  • useCombobox: use mouse and touch events to trigger blur (#​893) (6b7a79b)

v4.0.4

Compare Source

Bug Fixes
  • useCombobox: pass down missing disabled prop in prop getters (#​882) (02c5c66)

v4.0.3

Compare Source

Bug Fixes

v4.0.2

Compare Source

Bug Fixes

v4.0.1

Compare Source

Bug Fixes
  • highlightedIndex: do not highlight disabled items by keyboard (#​799) (84b6ff6)

v4.0.0

Compare Source

Bug Fixes
Features
BREAKING CHANGES
  • release: TypeScript typings have changed for both useSelect and Downshift. See PR for details.

v3.4.8

Compare Source

Bug Fixes

v3.4.7

Compare Source

Bug Fixes
  • ts: fix useSelect typings for stateReducer and stateChangeTypes (#​847) (e3a0c23)

v3.4.6

Compare Source

Bug Fixes

v3.4.5

Compare Source

Performance Improvements
  • getItemProps: memoize the event handlers for item (#​841) (c90e41b)

v3.4.4

Compare Source

Bug Fixes
  • useSelect: fix Firefox menu close on toggleButton click (#​837) (c2fd95a)

v3.4.3

Compare Source

Bug Fixes
  • useSelect: respect disabled option passed to getItemProps (#​833) (fabffff)

v3.4.2

Compare Source

Bug Fixes
  • useSelect: respect disabled option passed to getToggleButtonProps (#​829) (9cf3838)

v3.4.1

Compare Source

Bug Fixes

v3.4.0

Compare Source

Features

v3.3.7

Compare Source

Bug Fixes

v3.3.6

Compare Source

Bug Fixes

v3.3.5

Compare Source

Bug Fixes
  • localise clearTimeout per useSelect mounted instances (#​795) (4ee97b5)

v3.3.4

Compare Source

Performance Improvements

v3.3.3

Compare Source

Bug Fixes

v3.3.2

Compare Source

Bug Fixes
  • useSelect controlled state and custom document for setStatus (#​774) (7f72cf3)

v3.3.1

Compare Source

Bug Fixes
  • rollup: fix imports and revert added namedExports (#​761) (cddf9a1)

v3.3.0

Compare Source

Features

v3.2.14

Compare Source

Bug Fixes
  • set-a11y-status: pass props.environment.document to getStatusDiv (#​755) (6ae0bbc)

v3.2.13

Compare Source

Bug Fixes
  • getRootProps: add access to ref from getRootProps (#​756) (009b016)

v3.2.12

Compare Source

Bug Fixes

v3.2.10

Compare Source

Bug Fixes
  • clear input text and selected item on escape key (#​689) (7dc7a5b)

v3.2.9

Compare Source

Bug Fixes
  • set-a11y-status: perform cleanup after setting a status (#​707) (7f75f2f)

v3.2.8

Compare Source

Bug Fixes

v3.2.7

Compare Source

Bug Fixes
  • highlightedIndex: reset to defaultHighlightedIndex on input value change (#​675) (5b721a1)
  • lint: change jest method that breaks the build (#​685) (dddd76c)

v3.2.6

Compare Source

Bug Fixes
  • scroll: replace state with getState in shouldScroll (#​682) (abafc98)

v3.2.5

Compare Source

Bug Fixes
  • keyDownHandlers: call setState instead of toggle when opening (#​681) (984f8f9)

v3.2.4

Compare Source

Bug Fixes
  • toggleMenu: removed breaking reset on toggle close (#​678) (363e7de)

v3.2.3

Compare Source

Bug Fixes

v3.2.2

Compare Source

Bug Fixes

v3.2.1

Compare Source

Bug Fixes

v3.2.0

Compare Source

Features

v3.1.13

Compare Source

Bug Fixes
  • ts: change touchStart to touchEnd in StateChangeTypes (#​648) (f846aa0)

v3.1.12

Compare Source

Bug Fixes

v3.1.11

Compare Source

Bug Fixes

v3.1.10

Compare Source

Bug Fixes

v3.1.9

Compare Source

Bug Fixes

v3.1.8

Compare Source

Bug Fixes
  • ie: error when pressing Tab key in Internet Explorer (#​635) (ddc8758)

v3.1.7

Compare Source

Bug Fixes

v3.1.6

Compare Source

Bug Fixes

v3.1.5

Compare Source

Bug Fixes

v3.1.4

Compare Source

Bug Fixes

v3.1.3

Compare Source

Bug Fixes

v3.1.2

Compare Source

Bug Fixes

v3.1.1

Compare Source

Bug Fixes
  • TS: ability to call getRootProps without arguments (#​605) (3c6733b)

v3.1.0

Compare Source

Features

v3.0.0

Compare Source

Bug Fixes
  • inputValue: always set inputValue properly (247b621), closes #​512
Features
  • add ARIA specification of First and Last option highlight (#​590) (d937119)
  • initial*: add initial* props for all state (b4435d6), closes #​467
BREAKING CHANGES
  • initial*: If you're using any of the props that start with default, you probably want to change that to initial instead. defaultSelectedItem and defaultInputValue were also removed in favor of initialSelectedItem and initialInputValue (respectively).
  • inputValue: if you control the selectedItem, we no longer set the inputValue to the defaultInputValue.
  • highlightedIndex: In compliance with the ARIA specification, downshift will now default to highlighting the first item when the user presses ⬇ and the last item when the user presses ⬆ (given the menu is closed). #​590

Renovate configuration

📅 Schedule: 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.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by WhiteSource Renovate. View repository job log here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant