feat: Introduce onInputValueChange prop to SelectBox and MultiSelectBox components#470
Conversation
9bced91 to
c0e9c0b
Compare
c0e9c0b to
cc566e4
Compare
|
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? |
|
Yup, it will involve some breaking changes that will enable theming and we will be using headlessui under the hood for input components. |
|
Migrated to HeadlessUI in V3. |
Closes #444
What - This** PR exposes a new
onInputValueChangeprop to theSelectBoxandMultiSelectBoxcomponents. As noted in the above issue, these components currently only have theonValueChangeprop, 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
SelectBoxandMultiSelectBoxin 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 theSelectBoxall at once for performance reasons. I need to be able to listen to the user input so I can dynamically refresh theSelectBoxmenu options.How - Mimicked the behavior of the
onValueChangeprop