pesto
#1
Hi, can´t get the »page.update:after«-hook working in vue-api:
created() {
this.load()
this.$events.$on("page.changeStatus",this.reload) // works
this.$events.$on("page.update:after", this.reload) // does nothing
},
methods: {
reload() {
console.log('reloading!')
this.page = this.$store.getters["content/values"]();
}
}
What is the correct way to do it?
Cheers
Peter
texnixe
#2
The only update event that I could find in the source code that is emitted clientside is model.update
.
1 Like
pesto
#3
Works perfectly. Thank you @texnixe.
Hey Sonja.
Do you have an idea how to prevent this event?
model.update
doesn’t returns a event-object.
this.$events.$on("model.update", (e) => {
e.preventDefault(); //e not exists!
});