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

feat: Introduce onInputValueChange prop to SelectBox and MultiSelectBox components #470

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rebasedming
Copy link

@rebasedming rebasedming commented May 19, 2023

Closes #444

What - This** PR exposes a new onInputValueChange prop to the SelectBox and MultiSelectBox components. As noted in the above issue, these components currently only have the onValueChange prop, which only fires when a menu item is selected. But, this prop does not fire when the user types into the search box, which prevents the developer from being able to capture user search input.

Why - Because of this missing prop, I was unable to use the SelectBox and MultiSelectBox in my application and had to create my own versions of these components as a workaround. In my application, there are tens of thousands of menu selection items, which cannot be loaded into the SelectBox all at once for performance reasons. I need to be able to listen to the user input so I can dynamically refresh the SelectBox menu options.

How - Mimicked the behavior of the onValueChange prop

@rebasedming rebasedming force-pushed the feat/selectbox-oninputvaluechange branch from 9bced91 to c0e9c0b Compare May 19, 2023 20:43
@rebasedming rebasedming force-pushed the feat/selectbox-oninputvaluechange branch from c0e9c0b to cc566e4 Compare May 19, 2023 20:44
@rebasedming rebasedming changed the title Introduce onInputValueChange prop to SelectBox and MultiSelectBox components feat: Introduce onInputValueChange prop to SelectBox and MultiSelectBox components May 19, 2023
@mitrotasios
Copy link
Contributor

hi @rebasedming, thanks for the work! We are currently migrating all our input elements to headlessui for our v3 release coming by next week hopefully. Until then we would like to avoid pushing related changes. Happy to implement this from then on though :)

@mitrotasios mitrotasios added the Type: Feature New feature for existing component label May 23, 2023
@rebasedming
Copy link
Author

hi @rebasedming, thanks for the work! We are currently migrating all our input elements to headlessui for our v3 release coming by next week hopefully. Until then we would like to avoid pushing related changes. Happy to implement this from then on though :)

Oh, cool! I wasn't aware of a v3 release...is this going to deprecate v2 that just came out a few months ago?

@mitrotasios
Copy link
Contributor

Yup, it will involve some breaking changes that will enable theming and we will be using headlessui under the hood for input components.

@severinlandolt
Copy link
Member

Migrated to HeadlessUI in V3.

@severinlandolt severinlandolt reopened this Sep 7, 2023
@Lary15 Lary15 mentioned this pull request Oct 7, 2023
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature New feature for existing component
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhancement Request: Missing onChange Event and Server Data Search in SelectBox API
3 participants