Use a dropdown with a default search prop
That it uses the default search function
Type 'true | ((options: DropdownItemProps[], value: string) => boolean | DropdownItemProps[])' is not assignable to type '(options: DropdownItemProps[], value: string) => boolean | DropdownItemProps[]'.
Type 'true' is not assignable to type '(options: DropdownItemProps[], value: string) => boolean | DropdownItemProps[]'.ts(2322)
1.1.0
search?: boolean | ((options: DropdownItemProps[], value: string) => DropdownItemProps[])
search?: (options: DropdownItemProps[], value: string) => DropdownItemProps[] | boolean
The new type means that you can provide a function, but that function has to return an array of options, or a boolean. Previously, you could provide a boolean (e.g. <Dropdown search />) or alternatively a function
@charliematters great report 👍 Would you like to create a PR to fix it?
I will have a go after work!
I raised the PR but it failed at the first hurdle because I forgot to add a label, ad now I can't update it 🤦♂️
Anyway, it's there - let me know if it needs updating
I raised the PR but it failed at the first hurdle because I forgot to add a label, ad now I can't update it 🤦♂️
@charliematters no worries, only maintainers can manage labels as we are using them to generate changelogs.
Most helpful comment
I will have a go after work!