From 352ce67e1c984e5edd341b769d320b6668a0d503 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Tue, 20 Jun 2023 10:29:55 +0300 Subject: [PATCH] Fixed #4065 - SplitButton: aria-expanded not set correctly --- components/lib/splitbutton/SplitButton.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/components/lib/splitbutton/SplitButton.vue b/components/lib/splitbutton/SplitButton.vue index ad9d98413..39cf8f91e 100755 --- a/components/lib/splitbutton/SplitButton.vue +++ b/components/lib/splitbutton/SplitButton.vue @@ -49,10 +49,15 @@ export default { isExpanded: false }; }, + mounted() { + this.$watch('$refs.menu.visible', (newValue) => { + this.isExpanded = newValue; + }); + }, methods: { onDropdownButtonClick() { 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) { if (event.code === 'ArrowDown' || event.code === 'ArrowUp') {