Typescript error on components prop after adding formatGroupLabel prop #5661
Unanswered
jhowell-droit
asked this question in
Q&A
Replies: 1 comment
-
Have you found solution? I have a similar error when I add component props to my custom Select. Adding type <Select
{...props}
options={data}
onInputChange={setSearch}
components={{
SingleValue: ({
children,
...props
}: SingleValueProps<DataFactory, false>) => (
<components.SingleValue {...props}>
{props.data?.value}
</components.SingleValue>
),
}}
/>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I'm building a custom Dropdown component for my design system which uses React Select under the hood. I'm adding custom components for the
Option
andMenu
components and have also just looked into adding Group headings when theoptions
data is grouped.Everything was working fine until I tried to add custom JSX for the Group Label as shown below, which has caused a bunch of typescript errors, also below.
Any pointers would be really helpful,
Thanks
Here's my component tsx file:
The errors shown are relating to the
components
prop (shown by the red underline in VSCode):Beta Was this translation helpful? Give feedback.
All reactions