Highlighted

custom click event on coral accordion is not working

Avatar

Avatar

srimanthg786

Avatar

srimanthg786

srimanthg786

21-03-2018

Hi,

I am Sri. I have been working on a report which leverages coral accordion. I am able to generate records inside coral accordion with no issues. However, I would like to implement custom click event explicitly on '<coral-accordion-item-label> (ItemA and Item B labels mentioned in the screenshot)' and 'coral-icon coral-Icon--chevronRight (which is this icon '>')'. I have tried applying click event on these two html tags but no luck. It would be great if someone could help me with this issue?

<coral-accordion>
      
<coral-accordion-item>
            
<coral-accordion-item-label>Item A</coral-accordion-item-label>
            
<coral-accordion-item-content>Item A content.</coral-accordion-item-content>
      
</coral-accordion-item>
      
<coral-accordion-item selected>
            
<coral-accordion-item-label>Item B</coral-accordion-item-label>
            
<coral-accordion-item-content>Item B content.</coral-accordion-item-content>
      
</coral-accordion-item>
</coral-accordion>

Screen Shot 2018-03-21 at 2.59.05 PM.png

Note: 'coral-Icon--chevronRight' icon has been generated dynamically on page load