-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Accordion/PanelMenu: (Tailwind) animation issues #5540
Comments
I assume this is unstyled or tailwind related because the showcase transitions fine? https://primereact.org/accordion/#basic |
We suspect the same. |
Hmm take a look at this: https://codesandbox.io/p/sandbox/primereact-bug-accordion-collapse-delayed-forked-98s696 |
Yeah that looks good. We found an edge case, where a small content causes the delay. For instance here, the first and second tab do have a delay, but the third with the larger content does not have a delay. Does the transition starts at a fixed height? |
All I see in the tailwind stuff is this?
|
There is also a transition attribute:
I think PrimeReact adds classes to the AccordionTab when the Tab is toggled. If you inspect the AccordionTab while toggling you see for a short moment the classes, |
Yep you are right: toggleable: {
timeout: 500,
classNames: {
enter: 'max-h-0',
enterActive: '!max-h-40 overflow-hidden transition-all duration-500 ease-in-out',
exit: 'max-h-40',
exitActive: '!max-h-0 overflow-hidden transition-all duration-500 ease-in'
}
}, |
@countersoda i want to test this again after the next release to see if it is the same or worse. I can't quite figure out why its delayed. |
@melloware Appreciated |
@countersoda 10.3.0 is out and looks like the same behavior. I can't explain it! |
Same issue but with PanelMenu component when there are over 3 items inside the dropdown. |
@Tarik1700 yeah i took a look at it but i am not that familiar with Tailwind. So PR is welcome if not if you need immediate help I suggets you check out PrimeReact PRO support. |
Issue - #5540 - Bugfix: fixed animations not working correctly on TRANSITION.toggleable with tailwind preset
Describe the bug
When closing the AccordionTab the transition delays a bit.
Reproducer
https://codesandbox.io/p/sandbox/primereact-bug-accordion-collapse-delayed-9yrj8d
PrimeReact version
10.3.0
React version
18.x
Language
TypeScript
Build / Runtime
Vite
Browser(s)
No response
Steps to reproduce the behavior
Expected behavior
Smooth transitioning when closing the AccordionTab
The text was updated successfully, but these errors were encountered: