Open kadoshmt opened 3 years ago
I'm having the same issue, as I want to get the value on the onChange event. There looks like two different types being used, either the form event or the 'Option' type. Is the 'Option' type exported?
Managed to have a rudamentary fix - not the best TS but it works:
type Option = { key: number | string; label: string; value: any };
<SelectMenu
options={options}
isMultiSelect
hasTags
onChange={(options: any) => {
const opts = options as Option[];
setFruits(opts);
}}
placeholder='Select a fruit...'
value={fruits}
/>
Hi guys. How can I configure the props onChange() and value element SelectMenu to works with Typescript.
I try this many ways, but is not working...
Error: