Answers for "how to prevent pannel toggle event in ngb accordian"

0

how to prevent pannel toggle event in ngb accordian

public toggleAccordian( props:NgbPanelChangeEvent ): void{
   props.nextState // true === panel is toggling to an open state 
                              // false === panel is toggling to a closed state
   props.panelId    // the ID of the panel that was clicked
   props.preventDefault(); // don't toggle the state of the selected panel
}
Posted by: Guest on February-06-2021
0

how to prevent pannel toggle event in ngb accordian

HTML:
<ngb-accordion (panelChange)="toggleAccordian($event)">


TS:
public toggleAccordian( props:NgbPanelChangeEvent ): void{
   props.nextState // true === panel is toggling to an open state 
                              // false === panel is toggling to a closed state
   props.panelId    // the ID of the panel that was clicked
   props.preventDefault(); // don't toggle the state of the selected panel
}
Posted by: Guest on February-06-2021

Browse Popular Code Answers by Language