Skip to content
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

Update dependency downshift to v6 - autoclosed #16

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Aug 26, 2020

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
downshift (source) 3.2.12 -> 6.1.12 age adoption passing confidence

Release Notes

downshift-js/downshift

v6.1.12

Compare Source

Bug Fixes

v6.1.11

Compare Source

Bug Fixes

v6.1.10

Compare Source

Bug Fixes
  • useCombobox: prevent default on Escape when open or has content (#​1407) (3eb7b44)

v6.1.9

Compare Source

Bug Fixes

v6.1.8

Compare Source

Bug Fixes
  • useMultipleSelect: removeSelectedItem adding duplicate items to selected items (#​1353) (bf709b9), closes #​1316

v6.1.7

Compare Source

Bug Fixes

v6.1.6

Compare Source

Bug Fixes

v6.1.5

Compare Source

Bug Fixes

v6.1.4

Compare Source

Bug Fixes

v6.1.3

Compare Source

Bug Fixes
  • environment: use Node variable within the provided window context (#​1264) (f6a449e)

v6.1.2

Compare Source

Bug Fixes
  • useSelect: clear debounced keysSoFar callback on unmount (#​1256) (a6bcd22)

v6.1.1

Compare Source

Bug Fixes

v6.1.0

Compare Source

Features

v6.0.16

Compare Source

Bug Fixes
  • hooks: prevent overwrite of itemRefs when hooks rerender (#​1219) (4b6860e)

v6.0.15

Compare Source

Performance Improvements

v6.0.14

Compare Source

Bug Fixes

v6.0.13

Compare Source

Bug Fixes

v6.0.12

Compare Source

Performance Improvements

v6.0.11

Compare Source

Bug Fixes
  • cleanupStatus: cleanup message container when it's outside the default document (#​1204) (2edda8b)

v6.0.10

Compare Source

Bug Fixes

v6.0.9

Compare Source

Performance Improvements

v6.0.8

Compare Source

Bug Fixes

v6.0.7

Compare Source

Bug Fixes

v6.0.6

Compare Source

Bug Fixes
  • useCombobox: select item on blur only when menu is open (#​1170) (d1299c4)

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: https://github.com/downshift-js/downshift/pull/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: https://github.com/downshift-js/downshift/pull/1075 https://github.com/downshift-js/downshift/pull/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: https://github.com/downshift-js/downshift/pull/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

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 https://github.com/downshift-js/downshift/issues/832.
Closes https://github.com/downshift-js/downshift/issues/892
Closes https://github.com/downshift-js/downshift/issues/891
Closes https://github.com/downshift-js/downshift/issues/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)

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), 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.


  • If you want to rebase/retry this PR, click this checkbox.

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

@renovate renovate bot force-pushed the renovate/downshift-6.x branch 2 times, most recently from 65c9631 to 45960fc Compare January 10, 2021 00:00
@renovate renovate bot changed the title Update dependency downshift to v6 Update dependency downshift to v6 - autoclosed Nov 20, 2022
@renovate renovate bot closed this Nov 20, 2022
@renovate renovate bot deleted the renovate/downshift-6.x branch November 20, 2022 12:11
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.

0 participants