yuche / vue-strap

Bootstrap components built with Vue.js
http://yuche.github.io/vue-strap/
MIT License
4.71k stars 935 forks source link

Add events to accordion when panel opens and closes. #498

Open Konafets opened 7 years ago

Konafets commented 7 years ago

Note: For v2 branch.

It would be nice if an accordion has knowledge when one of its panels opens or closes and which panel it is.

My usecase is that I want to send an AJAX request when a panel get closed.

With the following implementation the open and closed event on the panel will pushed to the accordion component if the panel is within an accordion.

The closed event on the accordion component will be fired when an open panel got closed by opening another panel.