Reputation: 2143
I am using Vue Js Multiselect plugin. https://vue-multiselect.js.org/#sub-single-select Using is for single search. I need to reset the value which are selected in the dropdown once the form successfully get submitted.
<multiselect
ref="vms_country"
id="countryCode_alpha_3"
v-model="countryCodeList"
placeholder="Select Country"
:options="getList"
label="country_name"
track-by="code"
:close-on-select="true"
:clear-on-select="false"
:allow-empty="false"
@select="dispatAction">
</multiselect>
Any function which we can use to reset the value without reloading the page.
Upvotes: 0
Views: 44
Reputation: 2143
I was able to this by assigneing the null to v modal in finally of form submit function call.
.finally(() => {
this.countryCodeList = null;
})
Upvotes: 0