Skip to content

Public events for accordion, accordion-item #4531

@jgibson02

Description

@jgibson02

Description

To support programmatically focusing certain, there should be public events to notify when accordion-items are opened/closed.

Acceptance Criteria

  • Public calciteAccordionChange event for accordion
  • Public events for accordion-item for open & close

Relevant Info

No response

Which Component

accordion, accordion-item

Example Use Case

In forms with several complex sections, there may be need to programmatically set the active prop of an accordion-item, e.g. to prompt the user for a required form control. If you had a piece of state with a boolean that was setting this active prop, then you would need to listen for when the user clicks on an accordion-item. You can currently (at least with the React wrapper) add an onClick event, but this would also fire when clicking anywhere inside the accordion-item's content.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    0 - newNew issues that need assignment.ArcGIS HubIssues logged by ArcGIS Hub team members.blockedThis issue is blocked by another issue.enhancementIssues tied to a new feature or request.estimate - 3A day or two of work, likely requires updates to tests.p - mediumIssue is non core or affecting less that 60% of people using the library

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions