I have this component:
const FilterTypeSelect = styled(FormSelect)`
width: 150px;
`;
where FormSelect is another component.
whenever I use the component like below:
<FilterTypeSelect
value={availableFilterTypes.find((filterTypeOption) => filterTypeOption.value === this.state.filterType)}
onChange={this.onFilterTypeChange}
options={availableFilterTypes}
/>
I get the following error:
Type '{ value: { value: FilterTypes; label: FilterTypes; } | undefined; onChange: (filterTypeOption: FormSelectOption<string>) => void; options: { ...; }[]; }' is not assignable to type 'IntrinsicAttributes & { ref?: Ref<FormSelect<unknown>> | undefined; key?: Key | null | undefined; innerRef?: RefObject<any> | undefined; } & { ...; } & { ...; }'.
Thanks!