JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › Accordion › getting data element from accordion smart-accordion-item › Reply To: getting data element from accordion smart-accordion-item
June 2, 2020 at 8:17 am
#100775
Hristofor
Member
Hi edwardsmarkf,
You can get the AccordionItem instance using the Element.closest()
method, like so: event.target.closest('smart-accordion-item')
. Another approach is to use Event.composedPath()
which will return all parents of the current target (including the AccordionItem).
Best Regards,
Christopher
Smart HTML Elements Team
https://www.htmlelements.com