-
Notifications
You must be signed in to change notification settings - Fork 1
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 react-select from v2.4.4 to v5 #198
base: master
Are you sure you want to change the base?
Conversation
Visit the preview URL for this PR (updated for commit 5f58dcc): https://ent-ninkasi-dev--pr198-renovate-react-selec-pzn2tv2e.web.app (expires Wed, 10 May 2023 05:32:43 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 3b0561e5cc3d851fe15278e5840d2aac3e38a547 |
e474c47
to
76aafd4
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
76aafd4
to
be355bc
Compare
9fd2809
to
17a3845
Compare
17a3845
to
5f58dcc
Compare
5f58dcc
to
d7c0ed5
Compare
132cc78
to
d84da09
Compare
⚠ Artifact update problemRenovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is. ♻ Renovate will retry this branch, including artifacts, only when one of the following happens:
The artifact failure details are included below: File name: package-lock.json
|
d84da09
to
cd6c538
Compare
cd6c538
to
f4f669b
Compare
f4f669b
to
bf7994c
Compare
|
bf7994c
to
5f86c39
Compare
This PR contains the following updates:
2.4.4
->5.8.2
Release Notes
JedWatson/react-select (react-select)
v5.8.2
Compare Source
Patch Changes
781284a9
#5771 Thanks @tu4mo! - Fix for calling non-cancellable scroll eventsv5.8.1
Compare Source
v5.8.0
Compare Source
Minor Changes
884f1c42
#5758 Thanks @Ke1sy! - 1. Added 'aria-activedescendant' for input and functionality to calculate it;v5.7.7
Compare Source
Patch Changes
224a8f0d
#5666 Thanks @yhy-1! - Add aria-disabled to select's control component.v5.7.6
Compare Source
Patch Changes
f6315cd5
#5672 Thanks @tu4mo! - Fix for calling non-cancellable scroll eventsv5.7.5
Compare Source
Patch Changes
9d1730ba
#5347 Thanks @aszmyd! - Make scroll lock div work on a document context it belongs tov5.7.4
Compare Source
Patch Changes
16414bb5
#5689 Thanks @Rall3n! - ResolvedefaultProps
deprecation warning for React v18+.v5.7.3
Compare Source
Patch Changes
59513d00
#5626 Thanks @emmatown! - Fix importingreact-select
in Node ESMv5.7.2
Compare Source
Patch Changes
925cd4a2
#5536 Thanks @Rall3n! -required
prop accessibiltiy and functionality improvementsv5.7.1
Compare Source
Patch Changes
597143ee
#5559 Thanks @gdiazdelaserna! - Addexports
field in package.jsonv5.7.0
Compare Source
Minor Changes
0773095f
#5457 Thanks @nderkim! - Add classNames API and unstyled propv5.6.1
Compare Source
Patch Changes
cda16826
#5482 Thanks @nderkim! - Fix unstable theme rerendering menuv5.6.0
Compare Source
Minor Changes
c37e86d8
#4882 Thanks @Rall3n! - Addrequired
propv5.5.9
Compare Source
Patch Changes
851ed2b8
#5430 Thanks @Rall3n! - Fix focused option ifdefaultMenuIsOpen
is setv5.5.8
Compare Source
Patch Changes
1ad6de4e
#5084 Thanks @kosciolek! - When focusing a dropdown option, the numbers included in the aria live region take filtering into consideration.v5.5.7
Compare Source
Patch Changes
0ca2d5ba
#5431 Thanks @nderkim! - Changeclass
components tofunctional
componentsv5.5.6
Compare Source
Patch Changes
92398939
#5409 Thanks @lukebennett88! - Move files around to as to be compatible with version 2 of@preconstruct/cli
v5.5.5
Compare Source
Patch Changes
0dd38029
#5246 Thanks @Rall3n! - Fix re-focus of component in Firefox if being disabled while focusedv5.5.4
Compare Source
Patch Changes
ebb0a17a
#5404 Thanks @Methuselah96! - Use ResizeObserver to auto-update menu position if availablev5.5.3
Compare Source
Patch Changes
07656aaa
#5399 Thanks @dependabot! - Update memoize-onev5.5.2
Compare Source
Patch Changes
00238f1a
#5376 Thanks @lukebennett88! - Fix bug with animated multi-value select width being too widev5.5.1
Compare Source
Patch Changes
0f6ef093
#5381 Thanks @Methuselah96! - Disable use of ResizeObserver for menu position auto-updating to avoid potential breaking changes.v5.5.0
Compare Source
Minor Changes
598f9ee0
#5256 Thanks @Methuselah96! - Auto-update menu position when using menu portallingv5.4.0
Compare Source
Minor Changes
5d49f70a
#5249 Thanks @Methuselah96! - ExportformatOptionLabel
types (i.e.,FormatOptionLabelMeta
andFormatOptionLabelContext
).v5.3.2
Compare Source
Patch Changes
1f140e42
#5177 Thanks @Methuselah96! - Fix view height used for menu positioning to be the scroll parent instead of the windowv5.3.1
Compare Source
Patch Changes
03bf7351
#5164 Thanks @Methuselah96! - Bump @emotion/react to ^11.8.1 to avoiduseInsertionEffect
bugv5.3.0
Compare Source
Minor Changes
c7d8d4b3
#5133 Thanks @nil4! - UpdatepeerDependencies
to include React 18Patch Changes
0aaa9575
#5134 Thanks @rkulinski! - Use defaultPrevented to skip duplicate event handler for clicking select.87e14431
#5131 Thanks @pcorpet! - Avoid referencing an ID that is not in the DOM7184d538
#5082 Thanks @Methuselah96! - Fix type inference for Async's loadOptions propbd4ee8ae
#5057 Thanks @Rall3n! - Prevent transition props from being forwarded to<input>
element inDummyInput
componentv5.2.2
Compare Source
Patch Changes
940a50b1
#4928 Thanks @Methuselah96! - Fix usage with esModuleInterop disabled54f9538e
#4941 Thanks @prichey! - Use React's AriaAttributes type directly rather than recreatinge97d45c0
#4908 Thanks @vjee! - Make 3rd argument of CommonProps['setValue'] optional.v5.2.1
Compare Source
Patch Changes
f172d7f9
#4886 Thanks @Akridian! - Hooks for creation of custom Selects are now exported from main entryv5.2.0
Compare Source
Minor Changes
6c7a3d1e
#4785 Thanks @Rall3n! - AddprevInputValue
to action metab522ac65
#4860 Thanks @ebonow! - Fix animated MultiValue transitions when being removed and change method used to generate unqiue keys for Option components. Closes #4844 , closes #4602Patch Changes
417e7217
#4842 Thanks @Methuselah96! - Remove src directory from published package480ea85b
#4846 Thanks @Methuselah96! - Add missing index to MultiValue props typeb8e34472
#4854 Thanks @mikunpham! - Make input container css re-compute whenever input value changes due to a bug from@emotion/react
in development env.v5.1.0
Compare Source
Minor Changes
8b38d49b #4807 Thanks @hcharley! - Export AsyncCreatableProps from creatable entrypoint
46eeda1a #4801 Thanks @Methuselah96! - Export more types from main entry point
Patch Changes
fdd01e66 #4833 Thanks @ebonow! - Value container display property should be grid when isMulti and has no value so the Placeholder component is positioned correctly with the Input
0937604f #4823 Thanks @mikunpham! - Fix the issue where input contents are moved to the left due to multiple space characters.
ec80b577 #4803 Thanks @Methuselah96! - Import CSSObject from @emotion/react instead of @emotion/serialize
v5.0.0
Compare Source
Upgrade Guide
Summary
react-select
so you no longer need to have@types/react-select
installed; we no longer include Flow typesforwardRef
for all wrapped components (#4489) - this means that if you were accessing anything on theSelect
instance using aref
, theref
will now reference the internalSelect
directly (see below for how to upgrade)Select
s (i.e.,makeCreatableSelect
,mangeState
,makeAsyncSelect
) these have now been replaced by hooks (i.e.,useCreatable
,useStateManager
,useAsync
).prefix__input
now targets the input and NOT the containerSelect
sreadonly
attribute on ourDummyInput
(#4634) - this results in better accessibility but usescaret-color
which is not available on IE11Details
Convert to TypeScript
We've rewritten
react-select
in TypeScript which means you can remove any dependencies on@types/react-select
. If you were using the Flow types than look into contributing types for v5 toflow-typed
.Here are the most notable changes when replacing
@types/react-select
with our packaged types:OptinTypeBase
getOptionValue
andgetOptionLabel
) so there's no longer a base type for optionsOptionsType
Options
GroupTypeBase
GroupBase
GroupedOptionsType
ReadonlyArray<Group>
ValueType
OnChangeValue
InputActionTypes
InputAction
NamedProps
Props
Select
(theref
type)SelectInstance
forwardRef
for all wrapped components" for more detailsAsyncSelect
(theref
type)SelectInstance
forwardRef
for all wrapped components" for more detailsCreatableSelect
(theref
type)SelectInstance
forwardRef
for all wrapped components" for more detailsAsyncCreatableSelect
(theref
type)SelectInstance
forwardRef
for all wrapped components" for more detailsIf you were previously importing a type from the
src
directory when using@types/react-select
:These should now be imported from the
dist/declarations/src
directory:We export any types from the main entry point that we think might be useful to the user. If you are using a type that is not exported from the main entry point please open a PR or issue so that we can add it.
If you are using custom props for the
Select
component you can use module augmentation to add them to theSelect
prop types:Drop IE11 support
This allows us to use modern CSS in order to improve the quality of
react-select
and remove excessive JavaScript code to work around not having the ability to use modern CSS. If you need IE11 support either:readonly
attribute on ourDummyInput
" since you can't override theDummyInput
component with the Styles or Components API.react-select
compatible with IE11, open a PR. We are unlikely to provide official support for IE11 since supporting IE11 makes maintainingreact-select
a lot more difficult and holds us back from changes we want to make, but we also are glad to accept simple changes if they make your life easier.Use
forwardRef
for all wrapped componentsNOTE: Accessing any of the internals of the
Select
component usingref
s is not part of our public API. The internals of theSelect
component can change at any time (including in minor and patch releases). The only methods on theSelect
component that are part of the public API are thefocus()
andblur()
methods.react-select
exports five components:BaseSelect
,CreatableSelect
,Select
(the default export),AsyncSelect
,AsyncCreatableSelect
. The last four components are wrappers around theBaseSelect
. Previously theref
for each of these components was pointing to itself, but now we useforwardRef
which means that theref
s for all five components now point toBaseSelect
.The
focus()
andblur()
methods are untouched by this change. However if you were accessing the internals of theBaseSelect
component, you will need to update how you were accessing theBaseSelect
. Here is how to update access to theBaseSelect
component:BaseSelect
ref
ref
CreatableSelect
ref.select.select
ref
Select
ref.select
ref
AsyncSelect
ref.select.select
ref
AsyncCreatableSelect
ref.select.select.select
ref
Replace HOCs with hooks
The primary reason for this change is that hooks combined with generic components are easier to type in TypeScript than HOCs combined with generic components. These HOCs/hooks are considered advanced usage.
If you were using the HOCs, it shouldn't be too hard to replace them with its corresponding hook (i.e.,
useStateManager
,useCreatable
, oruseAsync
). As an example, here is how the state managed Select (the default export) used to be constructed with themangeState
HOC:With hooks it is now constructed like this:
Consult the source code for how the other components are constructed.
Remove dependency on AutosizeInput
This is an exciting change because we get to drop our dependency on
react-input-autosize
. We now use a pure CSS solution to auto-size the input, however this means that we have to drop support for IE11 since IE11 does not fully support CSS grid. As part of this refactor the.prefix__input
CSS class now targets the input itself and NOT the container. See #4625 for more details.Improve screen reader experience
The following improvements have been made for screen reader users:
Also we've added the role of combobox and the required ARIA attributes to the
Input
andDummyInput
components to allow JAWS support and a better screen reader experience overall. See #4695 for more details.Use CSS grid for single value layout
Previously the absolution positioning of both the value and the placeholder pulled them out of the flow, and thus the component itself collapsed down when used as a flex child. To solve this we are now using CSS grid for the single value layout.
Remove
readonly
attribute on ourDummyInput
Previously we added the
readonly
attribute to theDummyInput
(whenisSearchable
is set tofalse
) in order to hide the flashing cursor and prevent devices from showing a virtual keyboard. However thereadonly
attribute causes theDummyInput
to be removed from the tab order in iOS Safari. In order to solve this we're replacing thereadonly
attribute with setting thecaret-color
CSS prop (which IE11 does not support) totransparent
and setting theinputMode
attribute on the<input>
tonone
.Changelog
Major Changes
ef87c3ac #4683 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.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
4b028829 #4634 - The readonly attribute has been removed from the DummyInput to improve accessibility
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.
ca2c0e5b #4756 Thanks @fdcds! - Add
option
field to type ofCreateOptionActionMeta
9e82aadc #4676 - The following improvements have been made for screen reader users:
638f5455 #4702 Thanks @Methuselah96! - The Option generic is no longer required to extend the OptionBase type
23cea0b5 #4782 Thanks @Methuselah96! - Fix type of loadingMessage prop to allow it to return any ReactNode
v4.3.1
Compare Source
Patch Changes
v4.3.0
Compare Source
Minor Changes
focusedOption
is now passed to the MenuList Component as a propPatch Changes
menuShouldScrollIntoView=false
Documentation Updates
v4.2.1
Compare Source
Patch Changes
v4.2.0
Compare Source
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
v4.1.0
Compare Source
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
v4.0.2
Compare Source
Patch Changes
v4.0.1
Compare Source
Patch Changes
v4.0.0
Compare Source
Upgrade Guide
Summary
onChange
(https://github.com/JedWatson/react-select/pull/4339) - theonChange
handler is now always passed an array of options ifisMulti
is set totrue
NonceProvider
componentDetails
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 ifisMulti
is set totrue
and will always be a single option ornull
ifisMulti
is set tofalse
. Previously the first parameter ofonChange
could be an array ornull
whenisMulti
was set totrue
.That means if you were previously using nullish coalescing in order to handle
null
forisMulti
:You can now remove the nullish coalescing because
onChange
will always be an array whenisMulti
is set totrue
:Emotion 11
The
NonceProvider
component now requires acacheKey
prop that corresponds to the newly requiredkey
prop for the Emotion cache. This won't affect you if you aren't usingNonceProvider
. 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
v3.2.0
Compare Source
Minor Changes
c615e93d #4084 Thanks @JedWatson! - Changed the
cx
andgetValue
props that are passed to components into instance properties, which means they now pass a referential equality check on subsequent renders.This is helpful, for example, when you're optimising the performance of rendering custom Option components - see #3055
72f6036f #4306 Thanks @bladey! - Remove duplicate prop createOptionPosition
Patch Changes
ee638d46 #4275 Thanks @Methuselah96! - Adds react ^17.0.0 to peer dependencies for React 17 support
a0133f19 #4154 Thanks @brenshanny! - Creatable: Fixed removing MultiValues that have identical values. See issue #4137 for details.
d1e660c6 #4213 Thanks @eythort! - Added a guard to the
ScrollCaptor
component to check thatel
exists before callingremoveEventListener
, fixes intermittent errorsa1e1db25 #4373 Thanks @Methuselah96! - Fixed value passed to onChange when clearing value
2ad29d61 #4136 Thanks @Methuselah96! - Base aria-live message on tabSelectsValue prop
ad890f27 #4326 Thanks @Methuselah96! - Updated react-input-autosize to v3.0.0
b28d9922 #3990 Thanks @nikitaindik! - Fixed onCreateOption is not always called for Creatable
24ba8702 #4289 Thanks @slimklim! - Added
innerProps
prop to the built-inMenuList
component to reduce the need for additional DOM nodes or forking internal code when passing additional props to the DOM element the MenuList component is rendering.See issue #4265 for an explanation.
v3.1.1
Compare Source
Patch Changes
c8d74bd5 #3979 Thanks @mitchellhamilton! - Fix repository field
c8447f48 #4034 Thanks @sophiebits! - Improve performance of option filtering when ignoreAccents is enabled (the default)
7af1aafb #4295 Thanks @JedWatson! - Fix menuplacement context
32ad5c04 #3892 Thanks @flexdinesh! - Fix react-select ignoring HTML5 "form" attribute
6af14fbb #3897 Thanks @lorisdev! - Removes the call to
onMenuOpen
on every input changeIf you were relying on this undesired behavior it may be a breaking change.
Please upgrade accordingly.
0eb1ef96 Thanks @JedWatson! - Fixes touch issues in IE11
ad608c8f #3928 Thanks @dpordomingo! - Update MenuPlacer context usage in order to the new React Context API
v3.1.0
Compare Source
Minor Changes
isLoading
prop support to the AsyncSelect component (see #3690)Patch Changes
textarea
elementConfiguration
📅 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.
This PR was generated by Mend Renovate. View the repository job log.