-
Notifications
You must be signed in to change notification settings - Fork 862
Closed
Description
I am implementing some changes for lens and using EuiAccordion.
I need to control the accordion from the outside because it has to change state to open when we search through the fields (see the screenshot, point 3). However, we still want to preserve the functionality of toggling it from the according header (eg.’ > available fields’) and that’s impossible once we control it from the outside (with a param forceState). I tried:
- Adding
onClickas a prop of Accordion, but it toggles the accordion even if we click on the internal content (eg. products.discount from the screenshot) - Adding
onClickonbuttonContent, but it doesn’t toggle when clicking on the accordion arrow ‘>’ and paddings areas. - Implementing provided
onTogglehandler that would modify external state, but it only fires as a callback on open and close so it will never be fired
I need a handler onAccordionClick etc that would allow me to add a function that would modify the external state when clicking on the top.
Metadata
Metadata
Assignees
Labels
No labels
