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

Prefer incoming open prop over OpenClosed state #1360

Merged
merged 2 commits into from
Apr 23, 2022

Conversation

RobinMalfait
Copy link
Member

@RobinMalfait RobinMalfait commented Apr 23, 2022

This PR will make sure that the open prop of the Dialog container has precedence over the open/closed state that's shared internally. This is safe to do because the open value internally will already be properly updated with the OpenClosed state if the incoming open value was undefined.

This fixes a bug where it could happen that a Dialog immediately pops up in a Disclosure Panel even if the Dialog has an open value of false.

Fixes: #1308

@vercel
Copy link

vercel bot commented Apr 23, 2022

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

Name Status Preview Updated
headlessui-react ✅ Ready (Inspect) Visit Preview Apr 23, 2022 at 9:26PM (UTC)
headlessui-vue ✅ Ready (Inspect) Visit Preview Apr 23, 2022 at 9:26PM (UTC)

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.

Dialog uses open/closed state from Context over props
1 participant