Skip to content

Commit

Permalink
fix(1648): Allow internalValue to be deeply watched
Browse files Browse the repository at this point in the history
  • Loading branch information
mattelen committed May 5, 2023
1 parent 17714a7 commit 7e55ed5
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/multiselectMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -387,12 +387,15 @@ export default {
}
},
watch: {
internalValue () {
internalValue: {
handler () {
/* istanbul ignore else */
if (this.resetAfter && this.internalValue.length) {
this.search = ''
this.$emit('update:modelValue', this.multiple ? [] : null)
}
if (this.resetAfter && this.internalValue.length) {
this.search = ''
this.$emit('update:modelValue', this.multiple ? [] : null)
}
},
deep: true
},
search () {
this.$emit('search-change', this.search)
Expand Down

0 comments on commit 7e55ed5

Please sign in to comment.