Skip to content

Commit

Permalink
Merge pull request #1695 from shentao/1648-deprecation-watch-array
Browse files Browse the repository at this point in the history
1648 deprecation watch array
  • Loading branch information
mattelen authored May 8, 2023
2 parents 00aa2df + 7e55ed5 commit 3947d1d
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 3947d1d

Please sign in to comment.