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

Allow changes to the className prop when the <Transition /> component is currently not transitioning #2722

Merged
merged 2 commits into from
Aug 31, 2023

Conversation

RobinMalfait
Copy link
Member

@RobinMalfait RobinMalfait commented Aug 31, 2023

This PR fixes an issue where updating the className didn't work.

This was sort of deliberate because we didn't want React to diff and update the className if we are currently transitioning. However, we didn't check for transitioning state itself. If the <Transition /> component is currently not transitioning then changing the className should work as expected.

Fixes: #2714

@vercel
Copy link

vercel bot commented Aug 31, 2023

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

Name Status Preview Comments Updated (UTC)
headlessui-react ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 31, 2023 2:04pm
headlessui-vue ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 31, 2023 2:04pm

@RobinMalfait RobinMalfait changed the title Allow changes to the className prop when the Transitiong component is currently not transitioning Allow changes to the className prop when the <Transition /> component is currently not transitioning Aug 31, 2023
@thecrypticace
Copy link
Contributor

🤦‍♂️

@Jarzka
Copy link

Jarzka commented Jan 30, 2024

I think this change has caused a bug in transitions: #2939

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.

Dynamic classes on Dialog.Panel no longer cause dialog fadeout but are not applied
3 participants