Fixed #4065 - SplitButton: aria-expanded not set correctly
parent
53308f0904
commit
352ce67e1c
|
@ -49,10 +49,15 @@ export default {
|
||||||
isExpanded: false
|
isExpanded: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$watch('$refs.menu.visible', (newValue) => {
|
||||||
|
this.isExpanded = newValue;
|
||||||
|
});
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onDropdownButtonClick() {
|
onDropdownButtonClick() {
|
||||||
this.$refs.menu.toggle({ currentTarget: this.$el, relatedTarget: this.$refs.button.$el });
|
this.$refs.menu.toggle({ currentTarget: this.$el, relatedTarget: this.$refs.button.$el });
|
||||||
this.isExpanded = !this.$refs.menu.visible;
|
this.isExpanded = this.$refs.menu.visible;
|
||||||
},
|
},
|
||||||
onDropdownKeydown(event) {
|
onDropdownKeydown(event) {
|
||||||
if (event.code === 'ArrowDown' || event.code === 'ArrowUp') {
|
if (event.code === 'ArrowDown' || event.code === 'ArrowUp') {
|
||||||
|
|
Loading…
Reference in New Issue