Open cjadhav opened 1 year ago
In the newer versions, filterOptions should be an array, so try it like this:
<SelectSearch
search={search}
filterOptions={search ? [(e) => filterDropdownOptions(e)] : []}
options={options || []}
autoComplete="none"
value={_.isObject(value) ? value.value.toString() : value}
onChange={(value, object) => onChange(object)}
{...rest}
/>```
Describe the bug I am looking for custom filter implementation for options provided. My implementationwas workig till v3.x.x but as soon as I updated to latest v4.1.6 I am getting Type Error.
I am implementing as follows,
Where as filterDropdownOptions function is as follows,
The above code works fine for v3 but when i updated module to v4.1.6 then getting following error as,
TypeError: Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.
To Reproduce Steps to reproduce the behavior:
Expected behavior It should not show any error and allow to filter the list as per user typed value.
Screenshots
Desktop:
Additional context The main agenda to update the module is to highlight the first option on list.(with & without filter). If we have any solution for that will be great help.
Thanks