kiwicom/orbit

Custom Option filtering for InputSelect

ConorHaining opened this issue · 1 comments

Is your feature request related to a problem? Please describe.

When a user types into the input field of the <InputSelect /> component, their input is only filtered by the title key of the Option type.

Describe the solution you'd like
I believe that searching the input against the title key is a good default, but it would be better if a function could be passed which allows the caller of the component to alter the filtering functionality.

Describe alternatives you've considered

I don't believe there is an alternative in this situation, it may be possible to use the onChange prop to alter the provided options but I think that's inefficient and may have unintended side effects.

Additional context

I have a working POC of this request which I'm happy to submit as a PR, but wanted to check that it's the kind of enhancement the project is interested in.

https://github.com/ConorHaining/orbit/tree/inputselect-custom-filter-func

Hi all, checking up to see if this is something the project is interested in? POC is linked above, and happy to add docs & tests if you want to move forward.