vueform / multiselect

Vue 3 multiselect component with single select, multiselect and tagging options (+Tailwind CSS support).
https://vueform.com
MIT License
808 stars 151 forks source link

clear event dispatcher now updates before emiting #333

Closed EngHell closed 1 year ago

EngHell commented 1 year ago

As select and deselect, do update modelValue before emitting their respective events, clear now updates before emitting the clear event, to make it consistent.

This change is useful, because when you bind a listener to select or deselect you may easily use the ref passed to v-model, while for the clear event listener, v-model has not been yet updated which makes it complex to trigger other functions that rely on in the selected value, in my use case I have a reusable filter component that may spawn dozens of multiselect elements based of an array prop with configurations.