Skip to content

Commit

Permalink
fix(Tabs): recalculate marker if items change (nuxt#2101)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonataw authored and binhth-1206 committed Sep 14, 2024
1 parent a0a0517 commit e672850
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/runtime/components/navigation/Tabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,11 @@ export default defineComponent({
calcMarkerSize(selectedIndex.value)
})
watch(() => props.items, async () => {
await nextTick()
calcMarkerSize(selectedIndex.value)
}, { deep: true })
onMounted(async () => {
await nextTick()
calcMarkerSize(selectedIndex.value)
Expand Down

0 comments on commit e672850

Please sign in to comment.