Open fshahmt opened 1 year ago
The default-value
prop is not reactive and is only used during creation. One hacky way would be to force the recreation of the component by using Vues key
attribute.
<autocomplete
:key="userDetails.secondaryArea"
:search="searchArea"
:get-result-value="getResultValue"
@submit="setSecondaryAreaForUser"
:default-value="userDetails.secondaryArea"
/>
` <autocomplete :search="searchArea" required placeholder="Search and select" aria-label="Search and select" class="hard-skills" :get-result-value="getResultValue" @submit="setSecondaryAreaForUser" v-bind:default-value="userDetails.secondaryArea"
This is the markup for the code.
When I select a new value in the other select (this one is basically a dependant), I reset the userDetails.secondaryArea value to null but it still has the old value.
This is definitely not the expected behaviour.
` <div class="form-group text-left" @change="reset('institution')">
This is the minimal code you can test it with, just add whatever script long as you get the same results