Closed soongsta closed 1 year ago
running into the same issue on my end. seems i cannot clear a selection
I have the perfect example for this.
Using Vue-Select wrapped in a VueComponent, when the rest of the form values are reset to empty string values, Vue-Select will hold onto the selected value in model_value
and _value
. Setting the v-model
to an empty { label: '', data: ''}
will set a selection with an empty label string.
The consistent way I've been able to clear the selection is by setting your v-model
to undefined
using your stackblitz project.
Fork: https://stackblitz.com/edit/node-lkrt63?file=pages%2Findex.vue
This issue persists on beta 5
This is how I'd do it based on the original stackblitz example.
https://stackblitz.com/edit/node-ngtd7i?file=pages/index.vue
Question How to deselect or clear selection in vue-select 4.0.0-beta.3
Reproduction Link https://stackblitz.com/edit/node-iquvk1?file=pages%2Findex.vue You may need to "npm run dev" in the console window
The reproduction link shows 2 ways where I am trying to call a method to clear the region field What is the proper way to do this? As both methods I have tried do not work
Cheers