Fixed #660 - SplitButton: after selecting the default command, the command menu does not close
parent
cc5c452451
commit
ee81506e57
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div :class="containerClass" :style="style">
|
<div :class="containerClass" :style="style">
|
||||||
<PVSButton type="button" class="p-splitbutton-defaultbutton" v-bind="$attrs" :icon="icon" :label="label" />
|
<PVSButton type="button" class="p-splitbutton-defaultbutton" v-bind="$attrs" :icon="icon" :label="label" @click="onDefaultButtonClick" />
|
||||||
<PVSButton type="button" class="p-splitbutton-menubutton" icon="pi pi-chevron-down" @click="onDropdownButtonClick" :disabled="$attrs.disabled"
|
<PVSButton type="button" class="p-splitbutton-menubutton" icon="pi pi-chevron-down" @click="onDropdownButtonClick" :disabled="$attrs.disabled"
|
||||||
aria-haspopup="true" :aria-controls="ariaId + '_overlay'"/>
|
aria-haspopup="true" :aria-controls="ariaId + '_overlay'"/>
|
||||||
<PVSMenu :id="ariaId + '_overlay'" ref="menu" :model="model" :popup="true" :autoZIndex="autoZIndex"
|
<PVSMenu :id="ariaId + '_overlay'" ref="menu" :model="model" :popup="true" :autoZIndex="autoZIndex"
|
||||||
|
@ -46,6 +46,9 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
onDropdownButtonClick() {
|
onDropdownButtonClick() {
|
||||||
this.$refs.menu.toggle({currentTarget: this.$el, relativeAlign: this.appendTo == null});
|
this.$refs.menu.toggle({currentTarget: this.$el, relativeAlign: this.appendTo == null});
|
||||||
|
},
|
||||||
|
onDefaultButtonClick() {
|
||||||
|
this.$refs.menu.hide();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
Loading…
Reference in New Issue