Open jgibson02 opened 2 years ago
+1 this would also be helpful for our migration as we hide some 'expensive' components (such as the ArcGIS JS API) initially and only lazy load the content when the user opens the accordion item:
Public events for accordion-item for open & close
This is blocked by https://github.com/Esri/calcite-design-system/issues/6473. cc @geospatialem
Description
To support programmatically focusing certain, there should be public events to notify when accordion-items are opened/closed.
Acceptance Criteria
calciteAccordionChange
event foraccordion
accordion-item
for open & closeRelevant 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 thisactive
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 anonClick
event, but this would also fire when clicking anywhere inside the accordion-item's content.