Skip to content
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

Lazy-loaded components do not show inside disclosure panel the first time it is opened #2757

Closed
akhdefault opened this issue Sep 18, 2023 · 3 comments · Fixed by #2760
Closed
Assignees

Comments

@akhdefault
Copy link

akhdefault commented Sep 18, 2023

What package within Headless UI are you using?

@headlessui/react

What version of that package are you using?

For example: v1.7.17

What browser are you using?

Same problem everywhere, eg Chrome

Reproduction URL

https://codesandbox.io/p/sandbox/vigorous-boyd-szywc7?file=%2Fsrc%2Flazy.tsx

Describe your issue

Lazy-loaded react components only show inside Disclosure panel after second opening.

Steps to reproduce

Click on the second disclosure component ("Section 2 (with lazy component)") - it's empty, neither the lazily loaded component nor fallback; close panel and reopen again - it's there.

Expected result

It should be there the first time.

@akhdefault akhdefault changed the title Lazy-loaded components do not show inside disclosure panel Lazy-loaded components do not show inside disclosure panel the first time it is opened Sep 18, 2023
@thecrypticace thecrypticace self-assigned this Sep 18, 2023
@thecrypticace
Copy link
Contributor

This should be fixed by #2760, and will be available in the next release.

You can already try it using:

  • npm install @headlessui/react@insiders

@akhdefault
Copy link
Author

I've tried using insiders, but it's missing combobox component, which I was using. Are you planning to drop it?

@thecrypticace
Copy link
Contributor

Insiders has combobox but NPM may have picked up an old version if you did an upgrade (has to do with the version numbers for insiders using commit hashes).

Try removing it from your package.json, installing, and then running the following:

npm install @headlessui/react@insiders --save-exact

and see if that works

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 a pull request may close this issue.

2 participants