Hello,
I’m working on an Ionic React application and I can’t get to stop click propagation in accordion headers. When I click on my information button (located in accordion header), the accordion expands no matter what I try.
Here is a capture:
And here is my code snippet:
<IonList>
<IonAccordionGroup expand="inset">
<IonAccordion>
<IonItem slot="header" className="accordion-header">
<IonLabel>
Identité
<IonNote className="item-status"
style={{
color: getStatusColor(status.identity)
}}>
{docStatusList[status.identity]}
</IonNote>
</IonLabel>
<IonButton onClick={(e) => {
e.stopPropagation();
setHelp({
display: true,
header: "Aide identité",
message: getIdentityHelpMessage()
});
}}>
<IonIcon icon={informationCircleOutline} />
</IonButton>
</IonItem>
This stopPropagation method works everywhere else in the code, just not for accordion headers.
Any help would be very much apreciated !
Thank you !