diff --git a/packages/react-select/CHANGELOG.md b/packages/react-select/CHANGELOG.md index 8dabac9e04..cd2f35663c 100644 --- a/packages/react-select/CHANGELOG.md +++ b/packages/react-select/CHANGELOG.md @@ -1,5 +1,11 @@ # react-select +## 5.7.4 + +### Patch Changes + +- [`16414bb5`](https://github.com/JedWatson/react-select/commit/16414bb53295b362690d2b089d74182ddeabc1dd) [#5689](https://github.com/JedWatson/react-select/pull/5689) Thanks [@Rall3n](https://github.com/Rall3n)! - Resolve `defaultProps` deprecation warning for React v18+. + ## 5.7.3 ### Patch Changes diff --git a/packages/react-select/package.json b/packages/react-select/package.json index 8e05e4019e..829c4a87b4 100644 --- a/packages/react-select/package.json +++ b/packages/react-select/package.json @@ -1,6 +1,6 @@ { "name": "react-select", - "version": "5.7.3", + "version": "5.7.4", "description": "A Select control built with and for ReactJS", "main": "dist/react-select.cjs.js", "module": "dist/react-select.esm.js", diff --git a/packages/react-select/src/components/Menu.tsx b/packages/react-select/src/components/Menu.tsx index d5cc0a79ad..7483fa045e 100644 --- a/packages/react-select/src/components/Menu.tsx +++ b/packages/react-select/src/components/Menu.tsx @@ -498,49 +498,53 @@ export const NoOptionsMessage = < Option, IsMulti extends boolean, Group extends GroupBase ->( - props: NoticeProps -) => { - const { children, innerProps } = props; +>({ + children = 'No options', + innerProps, + ...restProps +}: NoticeProps) => { return ( {children} ); }; -NoOptionsMessage.defaultProps = { - children: 'No options', -}; export const LoadingMessage = < Option, IsMulti extends boolean, Group extends GroupBase ->( - props: NoticeProps -) => { - const { children, innerProps } = props; +>({ + children = 'Loading...', + innerProps, + ...restProps +}: NoticeProps) => { return ( {children} ); }; -LoadingMessage.defaultProps = { - children: 'Loading...', -}; // ============================== // Menu Portal diff --git a/packages/react-select/src/components/indicators.tsx b/packages/react-select/src/components/indicators.tsx index 052cc13c90..51a2ecec28 100644 --- a/packages/react-select/src/components/indicators.tsx +++ b/packages/react-select/src/components/indicators.tsx @@ -287,17 +287,22 @@ export const LoadingIndicator = < Option, IsMulti extends boolean, Group extends GroupBase ->( - props: LoadingIndicatorProps -) => { - const { innerProps, isRtl } = props; - +>({ + innerProps, + isRtl, + size = 4, + ...restProps +}: LoadingIndicatorProps) => { return ( @@ -306,4 +311,3 @@ export const LoadingIndicator = < ); }; -LoadingIndicator.defaultProps = { size: 4 };