Skip to content

feat: add skip-accordion-toggle attribute #30291

Open
@eduardoRoth

Description

@eduardoRoth

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 the header 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions