Skip to content

Commit

Permalink
fix(Tabs): update modelValue only if it different from current
Browse files Browse the repository at this point in the history
  • Loading branch information
hrynevychroman committed Jan 17, 2025
1 parent e14f035 commit 0687e1b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/radix-vue/src/Tabs/TabsRoot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ const tabsList = ref<HTMLElement>()
provideTabsRootContext({
modelValue,
changeModelValue: (value: StringOrNumber) => {
// prevent double update (when focus and click)
if (modelValue.value === value) {
return
}
modelValue.value = value as T
},
orientation,
Expand Down

0 comments on commit 0687e1b

Please sign in to comment.