Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

RobinMalfait
Copy link
Member

Right now we assume that the Tab components are rendered when calculating the active index. But this isn't always the case if we are lazy loading the tab components.

If no tabs are available, then calculating the next index would result in -1 which is incorrect because then nothing is selected. Instead, we keep the currently selected index (typically 0) and once the tab gets loaded it will be the active one automatically.

Fixes: #2596
Fixes: #2640

Currently we were assuming that the `tabs` were always there, but this
@vercel
Copy link

vercel bot commented Aug 3, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
headlessui-react ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 3, 2023 9:59am
headlessui-vue ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 3, 2023 9:59am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

reopen: tab content is not displayed when components are imported async tab content is not displayed when components are imported async
1 participant