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

"Open" property on accordion #2238

Closed
caroliss opened this issue Jul 12, 2024 · 2 comments · Fixed by #2318
Closed

"Open" property on accordion #2238

caroliss opened this issue Jul 12, 2024 · 2 comments · Fixed by #2318
Labels
good-first-issue Issues that are easy to fix for new team members or external contributors kind/feature-request New feature or request status/triage

Comments

@caroliss
Copy link
Contributor

Description

We would like a property on the accordion component that can be used to set the accordion open by default. This should be a boolean, and should also support dynamic expressions.
This would be useful to show some info to the user from the beginning, and also to make it possible to add an "open all" functionality.

Additional Information

No response

@caroliss caroliss added the kind/feature-request New feature or request label Jul 12, 2024
@danielskovli
Copy link
Contributor

danielskovli commented Jul 15, 2024

This can be implemented by passing a value to Accordion.Item -> defaultOpen.

Our implementation: Accordion, AccordtionItem.

@danielskovli danielskovli added the good-first-issue Issues that are easy to fix for new team members or external contributors label Jul 15, 2024
@olemartinorg
Copy link
Contributor

Adding to this, I think the AccordionGroup component could have an option to make sure only one of the children Accordion components are open at any point in time. I agree with the option for "open all", but that should not be possible to configure alongside a "only keep one accordion open simultaneously" option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good-first-issue Issues that are easy to fix for new team members or external contributors kind/feature-request New feature or request status/triage
Projects
Status: No status
3 participants