Open Tragio opened 6 days ago
Indeed, I can see that. Perhaps would the unmount
prop handle your usecase ? This prop is meant for components not to be mounted unless the current tab is the appropriate one. This improves performance when using heavy components in each tab, and will re-run the request everytime you switch to this tab
Hi @noook š ahhh yes, it solved, I never saw that prop
š
perhaps we could improve the docs for that use-case?
It's quite recent, I'm actually the one that introduced it for a very similar usecase!
If you'd like to submit a PR to improve the documentation feel free! Otherwise I can do it
Ahhh okido, so if you implemented it then you're more suitable than I for it š however, if you don't have time I can do it. I'll keep the issue open until the upcoming PR is created and merged.
Thank you very much for your support š
Environment
Version
2.17.0
Reproduction
https://stackblitz.com/edit/nuxt-ui-qs48un?file=app.vue
Description
When using the
UTabs
component, a Lazy component is never lazyloaded.In the reproduction, you can see that the API call from Tab 2 is always called. However, If you put those Lazy components outside the UTabs and change it to
selectedTab
it works properly, as you can't see the API call.Additional context
No response
Logs
No response