shift73k/assets_old/js/_alert-remover.js

10 lines
315 B
JavaScript

// This will tell liveview to clear a flash key
// after a bootstrap alert close event
export const AlertRemover = {
mounted() {
this.el.addEventListener("closed.bs.alert", () => {
// Bootstrap finished removing the alert element
this.pushEvent("lv:clear-flash", this.el.dataset);
});
},
};