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

"Maximum update depth exceeded" when rendering ListboxOptions as Fragment #3507

Closed
benface opened this issue Oct 4, 2024 · 7 comments · Fixed by #3513
Closed

"Maximum update depth exceeded" when rendering ListboxOptions as Fragment #3507

benface opened this issue Oct 4, 2024 · 7 comments · Fixed by #3513
Assignees

Comments

@benface
Copy link

benface commented Oct 4, 2024

What package within Headless UI are you using?

@headlessui/react

What version of that package are you using?

2.1.9

What browser are you using?

All

Reproduction URL

https://codesandbox.io/p/sandbox/k7crc9

Describe your issue

This is exactly like #3476, but for ListboxOptions. Click on the listbox in the CodeSandbox to see the error.

@snigdha920
Copy link

I downgraded to 2.1.2 and I still have this error.

@RobinMalfait
Copy link
Member

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

You can already try it using:

  • npm install @headlessui/react@insiders.

@ericalli
Copy link

ericalli commented Oct 9, 2024

@RobinMalfait I was just digging into this issue as I'm also experiencing it. The insiders version is working for me!

Any rough timeline for the next official release?

@RobinMalfait
Copy link
Member

@ericalli we just published a new release. npm install @headlessui/react@latest should do the trick 👍

@nicolas-rohricht
Copy link

Just adding something I found here that might be helpful for the ones who came to search for this issue...

Even after upgrading to the fixed release I still was experiencing this issue. Maximum update depth exceeded...
After spending a whole day investigating, found that (by any reason I don't know, maybe copied component code from any tutorial or something) I was passing a transition prop to the ListboxOptions component.

So all I needed to do was changing from this:

<ListboxOptions
  transition
  className={''}
  ...
/>

To this

<ListboxOptions
  className={''}
  ...
/>

@NadjibBELLOUNDJA
Copy link

@nicolas-rohricht that did the trick for me, thank you, you saved me a lot of time investigating !!

@Crownpack07
Copy link

We still experiencing this issue on version 2.2.0 and we do not want to remove the transition, Are there plans to fix this still any time soon?

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.

7 participants