Skip to content

Releases: JedWatson/react-select

react-select@5.0.0-beta.1

03 Sep 00:17
687e973
Compare
Choose a tag to compare
Pre-release

Patch Changes

  • 10225290 #4720 - Updated the layout for the singleValue input/placeholder/container so that it works better when used in flex layouts.

  • 53f1972b #4731 Thanks @JedWatson! - MultiValue key now includes a hyphen between the value and the index to prevent edge cases where you could get a duplicate key error

  • b41f4ceb #4704 Thanks @Rall3n! - Fix findDOMNode deprecation by adding refs to transition components

  • 7fcec537 #4697 - Add the role of combobox and the required ARIA attributes to the Input and DummyInput components to allow JAWS support and a better screen reader experience overall.

  • 9e82aadc #4676 - The following improvements have been made for screen reader users:

    • NVDA now announces the context text when initially focused
    • Selected option/s (single and multi) are now announced when initially focused
    • VoiceOver now announces the context text when re-focusing
    • The clear action is now announced
    • Placeholder text is now announced
    • Mobile VoiceOver is now able to remove selected multi options
  • 638f5455 #4702 Thanks @Methuselah96! - The Option generic is no longer required to extend the OptionBase type

react-select@5.0.0-beta.0

09 Jul 00:55
9582d07
Compare
Choose a tag to compare
Pre-release

Major Changes

  • ef87c3ac #4489 Thanks @Methuselah96! - React-Select has been converted from Flow to TypeScript.

    Other changes for v5 include usage of forwardRef, new hooks for stateManager, async and creatable components, and more reliable filtering implementaion with new options in the creatable variant.

  • #4625 Thanks @ebonow! - Remove dependency on AutoSizeInput

    • BREAKING CHANGES:
      • IE11 no longer works as it does not fully support CSS grid
      • Renaming the .prefix__input now targets the input and NOT the container. Unfortunate but overdue and perhaps opens the door to completely decoupling the input from needing a container if autosizing is not important.

Patch Changes

  • 4b028829 #4634 - The readonly attribute has been removed from the DummyInput to improve accessibility

react-select@4.3.1

13 May 23:45
Compare
Choose a tag to compare

Patch Changes

  • 2c915d10 #4577 - Bump @emotion/cache to v11.4.0 which fixes an issue where different versions of Emotion running at the same time causes styles to disappear in production.

react-select@4.3.0

19 Mar 18:19
b0411ff
Compare
Choose a tag to compare

Minor Changes

Patch Changes

  • 7a414a7c #3262 Thanks @torkelo!
    • The Menu bottom is no longer scrolled into view when menuShouldScrollIntoView=false

Documentation Updates

  • #4109 Thanks @manvydasu
    • Replaced componentWillReceiveProps with componentDidUpdate in docs

react-select@4.2.1

05 Mar 16:18
56be61b
Compare
Choose a tag to compare

Patch Changes

  • ca3c41bb #4478 Thanks @ebonow! - Check passive events polyfill for the existence of window for SSR

react-select@4.2.0

05 Mar 03:35
ef2090e
Compare
Choose a tag to compare

Minor Changes

  • 2ffed9c6 #4444 Thanks @Rall3n! - Use accessor props to get value and label in compareOption

  • 2baf5a9d #4414 Thanks @ebonow! - Add ariaLiveMessages prop for internationalization and other customizations, add aria-live prop, and other accessibility fixes. Inspired heavily from the work done by @Kashkovsky, @radegran, @Malgalad, and @TheHollidayInn - thanks to them, @bozdoz for the thorough testing and recommendations, and for everyone who contributed constructive feedback towards a better accessibility experience.

  • 7cdb8a6b #4391 Thanks @ebonow! - Pass and sanitize CommonProps passed to Group and Input components

Patch Changes

react-select@4.1.0

07 Feb 00:35
6f0b424
Compare
Choose a tag to compare

Minor Changes

  • b5f9b0c5 #4342 Thanks @Methuselah96! - Standardized innerProps and className props on customizable components

  • 19b76342 #3911 Thanks @eugenet8k! - Add removedValues to onChange event meta when the action is clear (when the user clears the value in the Select)

Patch Changes

react-select@4.0.2

22 Jan 23:31
a62f1aa
Compare
Choose a tag to compare

Patch Changes

react-select@4.0.1

22 Jan 17:57
e7bafee
Compare
Choose a tag to compare

Patch Changes

react-select@4.0.0

22 Jan 13:30
4da6ee0
Compare
Choose a tag to compare

Upgrade Guide

Summary

  • Standardize value passed to onChange (#4339) - the onChange handler is now always passed an array of options if isMulti is set to true
  • Emotion 11 (#4283) - should only affect you if you're using the NonceProvider component
  • Remove usage of UNSAFE React methods (#4313) - shouldn't affect you except now you won't see those warning messages in the console anymore

Details

Standardize value passed to onChange

This change makes it so that the first parameter passed to the onChange callback will now always be an array of options if isMulti is set to true and will always be a single option or null if isMulti is set to false. Previously the first parameter of onChange could be an array or null when isMulti was set to true.

That means if you were previously using nullish coalescing in order to handle null for isMulti:

<Select
  isMulti
  onChange={(newValues) =>  setValues(newValues ?? [])}
/>

You can now remove the nullish coalescing because onChange will always be an array when isMulti is set to true:

<Select
  isMulti
  onChange={(newValues) =>  setValues(newValues)}
/>

Emotion 11

The NonceProvider component now requires a cacheKey prop that corresponds to the newly required key prop for the Emotion cache. This won't affect you if you aren't using NonceProvider. See #4283 for more details.

Remove usage of UNSAFE React methods

This isn't necessarily a breaking change, but it required a large refactor in order to accomplish so we released this in a major upgrade in case it has some unintended consequences.

Changelog

Major Changes

Patch Changes