Merge pull request #4224 from FVolral/fix/primevue-splitbutton-preventdefault
Fix: Add preventDefault on SplitButton click eventpull/4414/head
commit
6cf115d152
|
@ -79,7 +79,8 @@ export default {
|
|||
});
|
||||
},
|
||||
methods: {
|
||||
onDropdownButtonClick() {
|
||||
onDropdownButtonClick(event) {
|
||||
event.preventDefault();
|
||||
this.$refs.menu.toggle({ currentTarget: this.$el, relatedTarget: this.$refs.button.$el });
|
||||
this.isExpanded = this.$refs.menu.visible;
|
||||
},
|
||||
|
@ -90,6 +91,8 @@ export default {
|
|||
}
|
||||
},
|
||||
onDefaultButtonClick(event) {
|
||||
event.preventDefault()
|
||||
|
||||
if (this.isExpanded) {
|
||||
this.$refs.menu.hide(event);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue