-
Notifications
You must be signed in to change notification settings - Fork 603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to animate Button with Transition component #3037
Comments
@fech-dev Why not wrap the <FadeTransition>
<div :key="isFixUiBtnOpen">
<UButton
v-if="isUiBtnOpen"
label="Close"
@click="toggleUiBtn(false)"
/>
<UButton
v-else
label="Open"
@click="toggleUiBtn(true)"
/>
</div>
</FadeTransition> |
@HugoRCD Thank you for your answer! I think adding the div might work as a quick workaround, but it could introduce issues by altering the HTML structure, Maybe these days I can investigate on this and try to submit a solution. |
@lihbr @TheAlexLichter Would you have an idea about this? We can't use
Here is the |
Minimal reproduction in case it helps: <script lang="ts" setup>
const open = ref(false)
</script>
<template>
<div>
<Transition>
<NuxtLink v-if="open" custom>
<div @click="open = !open">true</div>
</NuxtLink>
<NuxtLink v-else custom>
<div @click="open = !open">false</div>
</NuxtLink>
</Transition>
</div>
</template> But I think it's not really something we can fix on The |
Environment
Is this bug related to Nuxt or Vue?
Nuxt
Version
3.0.0-alpha.x
Reproduction
nuxt-ui-button-transition-repro
Description
I'm unable to animate (or use transitions) with vue's Transition component with UButton. I've noticed that the UButton uses NuxtLink that renders a fragment. This is causing the problem, since Transition component will not be able to work with fragments.
Additional context
No response
Logs
The text was updated successfully, but these errors were encountered: