vue-dragula
vue-dragula copied to clipboard
Destroy is not working (Remove event listeners)
Hi,
I created the listeners for drop events :
Vue.vueDragula.eventBus.$on("drop", function (args) {...
I add the listener when the component is mounted, now I want to remove the listener when its destroyed.
How can I remove the listeners.
drake.destroy is the original method, I tried the following, but it didnt work:
Vue.vueDragula.destroy()
or
var bag = Vue.vueDragula.find("questions-bag"); bag.drake.destroy();
The directive will call destroy on unbind.
you can remove bus listener with Vue.vueDragula.eventBus.$off("drop", fn)