Accordion header

Hi ! How can make just hide item by click on arrow?

I added buttons on header accordion by toolbar, but when click one of them, fire event to close or open accordion content. Please Help !!! Thank you

1 Reply

BM Balaji M Syncfusion Team May 7, 2018 11:41 AM UTC

Hi Ali,  
  
Thanks for contacting Syncfusion support.  
  
You can prevent the accordion content close or open while clicking the toolbar items using expanding and clicked event of Accordion component.  
 
Please refer to the following code example:  
 
 public isExpanderClicked:boolean=false;  
       clicked(e:AccordionClickArgs) {      
           if (e.originalEvent.target.classList.contains('e-tgl-collapse-icon')){  
               this.isExpanderClicked=true;  
           }  
           else{  
               this.isExpanderClicked=false;  
           }  
       }  
       expand(e:ExpandEventArgs) {    
           if (!this.isExpanderClicked)  
               e.cancel = true;  
       }  
  
Please refer to the following sample demo:  
  
Refer to the following API link:  
  
Please let us know if you need any further assistance.  

Regards, 
M. Balaji 


Loader.
Up arrow icon