Skip to content

Commit

Permalink
fix(VSelect): update menu position on selection change
Browse files Browse the repository at this point in the history
fixes #14688
  • Loading branch information
KaelWD committed Feb 4, 2022
1 parent 48d0a74 commit 5974a84
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions packages/vuetify/src/components/VSelect/VSelect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,12 @@ export default baseMixins.extend<options>().extend({
internalValue (val) {
this.initialValue = val
this.setSelectedItems()

if (this.multiple) {
this.$nextTick(() => {
this.$refs.menu?.updateDimensions()
})
}
},
isMenuActive (val) {
window.setTimeout(() => this.onMenuActiveChange(val))
Expand Down Expand Up @@ -836,14 +842,6 @@ export default baseMixins.extend<options>().extend({
return this.returnObject ? i : this.getValue(i)
}))

// When selecting multiple
// adjust menu after each
// selection
this.$nextTick(() => {
this.$refs.menu &&
(this.$refs.menu as { [key: string]: any }).updateDimensions()
})

// There is no item to re-highlight
// when selections are hidden
if (this.hideSelected) {
Expand Down

0 comments on commit 5974a84

Please sign in to comment.