Getting type error with react select latest version #5653
Unanswered
Deepak-Bulani
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using react-select for my project. I have upgraded my projects react version to 18.2 and and node version 16 and on upgrading to react-select latest i.e. 5.7.3. I am getting type error on my code where I have used ValueContainer
Type '{ children: any; }' is missing the following properties from type 'ValueContainerProps<unknown, boolean, GroupBase<unknown>>': isDisabled, clearValue, cx, getStyles, and 10 more.
My Code:
if (!hasValue) { return <components.ValueContainer {...props}>{children}</components.ValueContainer> }
The compiled type declaration file for react select has the below value for valueComponent
ValueContainer: <Option_20, IsMulti_20 extends boolean, Group_20 extends GroupBase<Option_20>>(props: ValueContainerProps<Option_20, IsMulti_20, Group_20>) => import("@emotion/react").jsx.JSX.Element;
Beta Was this translation helpful? Give feedback.
All reactions