diff --git a/front/src/components/ui/Tabs.vue b/front/src/components/ui/Tabs.vue index 7f9c6e0e7..53673a020 100644 --- a/front/src/components/ui/Tabs.vue +++ b/front/src/components/ui/Tabs.vue @@ -15,10 +15,6 @@ provide(TABS_INJECTION_KEY, { tabs: tabs, }) -const currentTab = computed(() => - tabs.find(({title}) => title === currentTitle.value) -) - const currentIndex = computed(() => tabs.findIndex(({title}) => title === currentTitle.value) ) @@ -37,8 +33,8 @@ watch(() => tabs.length, (_, from) => { v-for="(tab, _) in tabs" :class="{ 'is-active': currentTitle === tab.title }" v-bind="tab" :onClick="() => { currentTitle = tab.title }" - @keydown.left="currentTitle = tabs[(currentIndex - 1 + tabs.length) % tabs.length]" - @keydown.right="currentTitle = tabs[(currentIndex + 1) % tabs.length]" + @keydown.left="currentTitle = tabs[(currentIndex - 1 + tabs.length) % tabs.length].title" + @keydown.right="currentTitle = tabs[(currentIndex + 1) % tabs.length].title" class="tabs-item" >