Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Option filtering for InputSelect #4124

Open
ConorHaining opened this issue Oct 30, 2023 · 1 comment
Open

Custom Option filtering for InputSelect #4124

ConorHaining opened this issue Oct 30, 2023 · 1 comment

Comments

@ConorHaining
Copy link

ConorHaining commented Oct 30, 2023

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

@ConorHaining
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant