-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
After upgrade to latest, floating-ui portal gets id=undefined #2778
Comments
Is this only in snapshot tests? In the browser it's defined with both conditional and unconditional rendering. |
Yes, you're right, it happens only in jest snapshots, any idea why it could be? |
I couldn't reproduce this with React 17 or 18 with a basic snapshot test using Vitest (both conditional and unconditional |
Hi, I finally managed to set up a reproduction: https://stackblitz.com/edit/vitejs-vite-erxqfe?file=src%2F__snapshots__%2FPopover.spec.js.snap you can see |
Have you tried:
|
I understand my specific issue shouldn't be a priority for you and I'm glad you always take the time to answer in zero time. Thank you! |
@atomiks I see this error in the browser with React 17.
|
I don't see the issue with Edit: nvm, I see the issue if it's not conditionally rendered based on |
Found fix here: #2908 (it happens in only a somewhat specific case) |
Thanks, the fix & reasoning makes sense!
Ugh, codesandbox makes it too many clicks nowadays to fork and share something. Fixed it now. Re: updating to React 18 - yeah, totally on the roadmap, just it takes time as we have some enormous amount of ancient enzyme tests to refactor, as it does not work very well with newer React versions. In a large company this takes a long time unfortunately. |
Describe the bug
After updating to .9, something looks wrong with the generation of the id for a floating ui portal
Expected behavior
I expect a floating-ui-N id to be generated.
Screenshots
Snapshot of the generated HTML:
Context:
The text was updated successfully, but these errors were encountered: