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

Add an option to the Accordion #356

Closed
arkhaiel opened this issue Jun 27, 2023 · 1 comment · Fixed by #364
Closed

Add an option to the Accordion #356

arkhaiel opened this issue Jun 27, 2023 · 1 comment · Fixed by #364
Labels
enhancement New feature or request

Comments

@arkhaiel
Copy link

Is your feature request related to a problem? Please describe.

I'd like to be able to show only one panel at a time

Describe the solution you'd like

I would like this kind of behaviour :

  • all panels are closed
  • I click on panel 2 : panel 2 opens
  • I click on panel 4 : panel 4 opens, and panel 2 closes

It could be an option, like 'closeIfOpen', that could be set to the component props, or/and in each panel prop ?

This way, everyone could fine-tune the panels behaviour, like panel 1 and 5 always open, and panels 2-3-4 will close if another one is opened. I must admit, this use-case might be quite rare.

My original idea was to always have one panel open, and being able to navigate to one panel at a time.

Thanks a lot ! And, oh my, your module is amazing !!

@arkhaiel arkhaiel added the enhancement New feature or request label Jun 27, 2023
Copy link
Member

I agree this would be a nice addition. However, I can't find a way to make this work using Headless UI Disclosure component.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants