diff --git a/public/js/components/Tabs.js b/public/js/components/Tabs.js index 5583c6286..7d2cf0500 100644 --- a/public/js/components/Tabs.js +++ b/public/js/components/Tabs.js @@ -6,7 +6,9 @@ export default { accessibility }, emits: [ - 'update:modelValue' + 'update:modelValue', + 'change', + 'changed' ], props: { configUrl: String, @@ -35,6 +37,13 @@ export default { } } }, + methods: { + change(key) { + this.$emit("change", key) + this.current = key; + this.$nextTick(() => this.$emit("changed", key)); + } + }, created() { CoreRESTClient .get(this.configUrl) @@ -87,7 +96,7 @@ export default { :key="tab.key" class="nav-item nav-link" :class="{active: tab.key == current}" - @click="current=tab.key" + @click="change(tab.key)" :aria-current="tab.key == current ? 'page' : ''" v-accessibility:tab >