auto hide the dropdown menu when click the secondary item

This commit is contained in:
MaysWind
2023-08-21 23:02:46 +08:00
parent 09f6dd8d82
commit 85d93c4f4b
@@ -6,6 +6,7 @@
:label="label" :label="label"
:menu-props="{ 'content-class': 'two-column-select-menu' }" :menu-props="{ 'content-class': 'two-column-select-menu' }"
v-model="currentSecondaryValue" v-model="currentSecondaryValue"
v-model:menu="menuState"
@update:menu="onMenuStateChanged" @update:menu="onMenuStateChanged"
> >
<template #selection> <template #selection>
@@ -117,6 +118,7 @@ export default {
], ],
data() { data() {
return { return {
menuState: false,
icons: { icons: {
chevronRight: mdiChevronRight chevronRight: mdiChevronRight
} }
@@ -143,6 +145,7 @@ export default {
return this.modelValue; return this.modelValue;
}, },
set: function (value) { set: function (value) {
this.menuState = false;
this.$emit('update:modelValue', value); this.$emit('update:modelValue', value);
} }
}, },