Skip to content

[BUG] - Accordion: disableAnimation prevents keepContentMounted from being set to false #5157

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

Closed
DG-DylD opened this issue Apr 7, 2025 · 1 comment · Fixed by #5172
Closed
Assignees
Labels
📦 Scope : Components Related to the components 🐛 Type: Bug Something isn't working

Comments

@DG-DylD
Copy link

DG-DylD commented Apr 7, 2025

HeroUI Version

2.7.4

Describe the bug

It looks like the disableAnimation condition in the AccordionItem component is returning early and skipping the keepContentMounted check. As a result, the isOpen state isn’t being used to determine whether the content should remain mounted or be unmounted when the accordion item is closed.

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

  1. Add an Accordion component to your UI.
  2. Set the disableAnimation prop to true on the Accordion.
  3. Leave keepContentMounted unset (it defaults to false).
  4. Observe that when an accordion item is closed, its children are not unmounted as expected.

Expected behavior

As a developer, I expect the disableAnimation prop to not have an effect on the keepContentMounted prop.

Screenshots or Videos

Image

Operating System Version

Windows

Browser

Chrome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 Scope : Components Related to the components 🐛 Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants