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 using MenuButton with as={Fragment} #3439

Closed
faebeee opened this issue Aug 26, 2024 · 3 comments · Fixed by #3478
Closed

Maximum update depth exceeded when using MenuButton with as={Fragment} #3439

faebeee opened this issue Aug 26, 2024 · 3 comments · Fixed by #3478
Assignees

Comments

@faebeee
Copy link

faebeee commented Aug 26, 2024

What package within Headless UI are you using?

@headlessui/react

What version of that package are you using?

2.1.3

What browser are you using?

Any

Minimal Repro Sandbox

You can use one of the starting projects on CodeSandbox:

Describe your issue

When using the MenuButton with the as={Fragment} property, I end up with a "Maximum update depth exceeded" Error

@serafxxx
Copy link

same for ComboboxInput

@jcypret
Copy link

jcypret commented Sep 5, 2024

We're seeing this as well starting with @headlessui/react v2.1.4 and also in the latest version v2.1.5:

Screenshot 2024-09-04 at 7 14 33 PM

Hitting the same error as @faebeee specifically related to as={Fragment} on MenuButton. If we drop the as or change it to something else like as="div", it works.

Screenshot 2024-09-04 at 7 16 50 PM

@RobinMalfait
Copy link
Member

Hey!

This should be fixed by #3478, and is available in the latest release (2.1.8).

You can already try it using:

  • npm install @headlessui/react@latest.

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