Customize Accordion expand or collapse animation behavior
21 Jun 20223 minutes to read
Accordion component supports customizing the expand or collapse animation action behavior. You can manually adjust the expand animation action that occurs after the collapse animation operation is performed on the already expanded pane, When the expand icons are clicked.
By default, the Accordion component pane is expanded or collapsed, while clicking the expand or collapse icon. It is not affected on already expanded pane.
The following sample demonstrates, how to expand the collapsed Accordion item after collapse animation is performed on the expanded Accordion item using
expanded event. In the Expanding event, get the previously expanded item index and prevent the expanding behavior using
args.cancel option. Expand the Accordion item dynamically based on the specified
index value using the
expandItem public method and