0

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!

  • Does this answer your question? [Not assignable to type IntrinsicAttributes & IntrinsicClassAttributes React.js](https://stackoverflow.com/questions/59969756/not-assignable-to-type-intrinsicattributes-intrinsicclassattributes-react-js) – Shahriar Ahmed Oct 07 '22 at 01:11

0 Answers0