When I pass a getter as value prop, and when the getter changes to null, the dynamic-select doesn't reset.
cbertelegni opened this issue · comments
When I pass a getter as value prop, and when the getter changes to null, the dynamic-select doesn't reset.
<dynamic-select
:options="optsList"
:value="selectedOpt"
option-value="id"
option-text="name"
placeholder="Elegí una opción"
/>
computed: {
selectedOpt () {
if (this.context.distrito) {
return {
id: this.context.distrito, // vuex getter
name: this.distritoName // vuex getter
}
}
return null
}
}
Good catch and clean fix. Thanks for contributing!