nuxt
nuxt copied to clipboard
Custom transition for specific NuxtChild
Types of changes
- [ ] Bug fix (a non-breaking change which fixes an issue)
- [x] New feature (a non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
Description
Hello friends. I'm playing with named views in Nuxt (2.18) - i would like to attach a specific transition only to one view.
So far i could not find a way to give any <NuxtChild> a specific transition. Looking at the source code it apparently always inherit either parent's or global transition.
Above is a simple change i made that allowed me to pass a transition object to my NuxtChild.
<div id="page">
<nav id="navigation">
<NuxtChild name="left" :transition="{name:'nav'}"/>
</nav>
<main>
<NuxtChild/>
</main>
</div>
Do you think this is worth pursuing with this change ? Or maybe there is a native solution to this.
Thank you, good day
Checklist:
- [x] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly. (PR: #)
- [ ] I have added tests to cover my changes (if not applicable, please state why)
- [ ] All new and existing tests are passing.