You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What's happening is that when I click on the Add New Driver button, I call a function to make a new driver, and then also reset the driverPhonev-model prop to be null, so that should clear the v-select input field. (you can see this in the code below)
But this clearing only works the first two times. After that, the Add New Driver option appears to be stuck there and the @input event is not fired anymore until I select a different option before selecting the Add New Driver option again.
To Reproduce
<v-select
v-model="driverPhone"
@input="driverInputChanged"
class="<omitted>"
:options="driversSelectFmtd"
label="nameWithPhone"
:reduce="driver => driver.phoneNumber"
>
<template #no-options>
<omitted>
</template>
</v-select>
...
export default Vue.Component("AddDelivery", {
..
data() {
return {
driverPhone: '',
};
},
methods: {
driverInputChanged(val) {
console.log(`\n\ndriver phone changed: ${val}`);
// User clicked on adding a new driver
if (val === ADD_DRIVER_OPTION) {
// addNewDriverFunc();
this.driverPhone = null; // this should reset the value of the v-select, but it isn't working when the same option is chosen repeatedly
}
},
...
}
Expected behavior
I expect that since I'm setting this.driverPhone = null; that I should be able to continually click on Add New Driver and it should always fire that event.
Desktop (please complete the following information):
OS: [e.g. iOS]
Browser [e.g. chrome, safari]
Version [e.g. 22]
MacOS, Chrome Version 83.0.4103.97 (Official Build) (64-bit)
vue-select 3.10.3
The text was updated successfully, but these errors were encountered:
Describe the bug
Here is a screen recording of the bug: https://www.loom.com/share/9830f13bce2540ae96d270d615083e58
What's happening is that when I click on the Add New Driver button, I call a function to make a new driver, and then also reset the
driverPhone
v-model
prop to be null, so that should clear the v-select input field. (you can see this in the code below)But this clearing only works the first two times. After that, the Add New Driver option appears to be stuck there and the
@input
event is not fired anymore until I select a different option before selecting the Add New Driver option again.To Reproduce
Expected behavior
I expect that since I'm setting
this.driverPhone = null;
that I should be able to continually click on Add New Driver and it should always fire that event.Desktop (please complete the following information):
MacOS, Chrome Version 83.0.4103.97 (Official Build) (64-bit)
vue-select 3.10.3
The text was updated successfully, but these errors were encountered: