Is there a decent way in Vue (2) to handle a Bootstrap (3) modal hide-event?
I found this as a JQuery way but I can\'t figure out how to capture this event in Vue:>
This may be late but another way if you are using a custom modal component (Modal.vue) you have created is to
mounted: function(){
this.triggerHidden();
}
methods: {
triggerHidden: function(){
var self = this;
if( $('#getModal').length ){
$('#getModal').on('hidden.bs.modal', function(){
//catch the native bootstrap close event and trigger yours
self.#emit('modal-close');
});
}
}
}
now call use your custom event with your custom/reusable modal component
The method doSomething will be called when the modal closes. You can also use the approach to hijack the other jquery event so its a little more manageable.