TotomInc / vue3-select-component

A flexible & modern select-input control for Vue 3.
https://vue3-select-component.vercel.app/
MIT License
56 stars 6 forks source link

emit text input change event #69

Closed foxhound87 closed 4 months ago

foxhound87 commented 4 months ago

Hello, I would like to handle the text input change event when you type in the input field.

For example like this:

            <VueSelect
              isSearchable
              @search="onSelectSearch" <<---
              v-model="selected"
              :is-multi="true"
              :options="[
                { label: 'Option #1', value: 'option_1' },
                { label: 'Option #2', value: 'option_2' },
                { label: 'Option #3', value: 'option_3' },
              ]"
            />
function onSelectSearch(event) {
  console.log("onSelectSearch", event.target.value);
  // access here the text input value and trigger an HTTP call
}

Thank you!

TotomInc commented 4 months ago

Hi, thanks for reporting this issue.

I can add an event when the search value is updated.

However, is it possible to add a bit more details about your use-case?

foxhound87 commented 4 months ago

thank you very much!

TotomInc commented 4 months ago

Will notice when this feature is deployed on a new version.

TotomInc commented 4 months ago

Available on v0.3.0

cc @foxhound87