Skip to content

Commit

Permalink
fix(BaseTabSlider): default tab detection on before mount
Browse files Browse the repository at this point in the history
  • Loading branch information
stafyniaksacha committed Jan 23, 2024
1 parent 5ce4d84 commit 3740d4a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion components/base/BaseTabSlider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@ const props = withDefaults(
)
const [modelValue] = defineModel<string>({
default: () => props.tabs[0]?.value,
default: null,
})
onBeforeMount(() => {
if (modelValue.value === null) {
modelValue.value = props.tabs[0]?.value
}
})
const justify = useNuiDefaultProperty(props, 'BaseTabSlider', 'justify')
Expand Down

0 comments on commit 3740d4a

Please sign in to comment.