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

[collapsible] Add unmountOnExit prop #728

Open
mj12albert opened this issue Oct 9, 2024 · 2 comments
Open

[collapsible] Add unmountOnExit prop #728

mj12albert opened this issue Oct 9, 2024 · 2 comments
Assignees
Labels
component: collapsible This is the name of the generic UI component, not the React module! new feature New feature or request

Comments

@mj12albert
Copy link
Member

mj12albert commented Oct 9, 2024

Follow up to #577 (review)

Do we have an API to not mount the children of an accordion? Something similar to https://mui.com/material-ui/react-accordion/#performance. When rendering heavy components under an accordion, e.g. in a dashboard: charts, data grid, etc. It can be a lifesaver for the performance responsiveness on the page.

Or is the idea to solve this problem with a new component of this kind: https://ark-ui.com/react/docs/utilities/presence?

@github-actions github-actions bot added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Oct 9, 2024
@mj12albert mj12albert self-assigned this Oct 9, 2024
@mj12albert mj12albert added new feature New feature or request component: collapsible This is the name of the generic UI component, not the React module! and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Oct 9, 2024
@colmtuite
Copy link
Contributor

This seems back-to-front to me. Wouldn't it be better—and more in-line with our other components—if the panel contents unmounted by default, and then you can use the keepMounted prop if you need it?

cc @michaldudak

@michaldudak
Copy link
Member

I'd name the prop keepMounted for sure. As for its default value, I don't have a strong opinion, but I lean towards making it consistent with other components (so false).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: collapsible This is the name of the generic UI component, not the React module! new feature New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants