-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
feat: add skip-accordion-toggle attribute #30291
Comments
Thank you for submitting the issue! Please provide a minimal repro that shows the use case that you are trying to implement that causes the accordion to toggle. This would give us a clear picture of why closing the accordion wouldn't be the desired outcome. |
Thanks for the issue! This issue has been labeled as Please reproduce this issue in an Ionic starter application and provide a way for us to access it (GitHub repo, StackBlitz, etc). Without a reliable code reproduction, it is unlikely we will be able to resolve the issue, leading to it being closed. If you have already provided a code snippet and are seeing this message, it is likely that the code snippet was not enough for our team to reproduce the issue. For a guide on how to create a good reproduction, see our Contributing Guide. |
@thetaPC you can check this Stackblitz example https://stackblitz.com/edit/stackblitz-starters-j3hqapui?file=src%2Fmain.ts Using |
Prerequisites
Describe the Feature Request
For Accordion and Accordion Groups, you can use the
event.stopPropagation()
method to avoid toggling the accordion if something is clicked inside theheader
slot, but this will break anything that depends on the event bubbling up (e.g. having a Radio Group parent component). Another option is required.Describe the Use Case
Creating a tree view with Accordions and using a Radio Group so only one item is selected. If you click on the Radio of an accordion header (which would be a folder) it will toggle the accordion, which is not exactly the expected behavior.
Describe Preferred Solution
By having a
skip-accordion-toggle
attribute, you can skip the Accordion toggle for any component inside the Accordion header, while letting the event bubble up.Describe Alternatives
No response
Related Code
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: