Useing VueJS Multiselect Plugin Need to reset the dropdown selection on form submit success

36 Views Asked by At

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.

1

There are 1 best solutions below

0
Anuja P On

I was able to this by assigneing the null to v modal in finally of form submit function call.

.finally(() => {
      this.countryCodeList = null;
    })