Releases: JedWatson/react-select
react-select@5.0.0-beta.1
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
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 forstateManager
,async
andcreatable
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.
- BREAKING CHANGES:
Patch Changes
- 4b028829 #4634 - The readonly attribute has been removed from the DummyInput to improve accessibility
react-select@4.3.1
react-select@4.3.0
Minor Changes
- 035294f4 #3360 Thanks @sunniejai!
focusedOption
is now passed to the MenuList Component as a prop
Patch Changes
- 7a414a7c #3262 Thanks @torkelo!
- The Menu bottom is no longer scrolled into view when
menuShouldScrollIntoView=false
- The Menu bottom is no longer scrolled into view when
Documentation Updates
- #4109 Thanks @manvydasu
- Replaced componentWillReceiveProps with componentDidUpdate in docs
react-select@4.2.1
react-select@4.2.0
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, addaria-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
-
c955415c #4437 Thanks @ebonow! - Set event listeners to be non-passive to remove Chrome console warnings
-
3ca22b2f #3827 Thanks @mitchellhamilton! - Memoize stripDiacritics in createFilter for the input with memoize-one so that stripDiacritics is not called for the same string as many times as there are options every time the input changes
Inspired by https://blog.johnnyreilly.com/2019/04/react-select-with-less-typing-lag.html
-
dce3863f #4423 Thanks @Methuselah96! - Remove browser alias fields in order to fix SSR apps
-
ec7c0728 #4443 Thanks @ebonow! - Allow tabIndex prop Type to be number or string
react-select@4.1.0
Minor Changes
-
b5f9b0c5 #4342 Thanks @Methuselah96! - Standardized innerProps and className props on customizable components
-
19b76342 #3911 Thanks @eugenet8k! - Add
removedValues
toonChange
event meta when the action isclear
(when the user clears the value in the Select)
Patch Changes
-
f600d13f #4422 Thanks @Methuselah96! - Fix finding focusable options for groups
-
a016c878 #4420 Thanks @Methuselah96! - Bump dependency on @babel/runtime in order to fix compatibility issues with Webpack 5
-
10b5f5a5 #4404 Thanks @Methuselah96! - Remove unnecessary dependency on @emotion/css
react-select@4.0.2
Patch Changes
- 44f285b0 #4399 Thanks @Methuselah96! - Fixed building focusable options from groups
react-select@4.0.1
Patch Changes
- 645feb3e #4396 Thanks @Methuselah96! - Fixed keys for options within groups
react-select@4.0.0
Upgrade Guide
Summary
- Standardize value passed to
onChange
(#4339) - theonChange
handler is now always passed an array of options ifisMulti
is set totrue
- 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
-
02050675 #4339 Thanks @Methuselah96! - Standardized value passed to onChange
-
26b6325c #4283 Thanks @majgaard! - Upgrades Emotion dependency to v11.0.0
BREAKING CHANGE: The NonceProvider component now requires a
cacheKey
prop that corresponds to thekey
for the Emotion cache. -
b2488bb5 #4313 Thanks @Methuselah96! - Removed usages of UNSAFE React methods
Patch Changes
- 2d5496d5 #4388 Thanks @Methuselah96! - Removed memoization of buildMenuOptions