I am trying to use the event listeners with inertia.post
, however I can't get it to do anything.
this.$inertia.post('/email/store', data, {
onStart: () => this.sending = true,
onFinish: () => this.sending = false,
})
The actual post is working and it is being routed properly. However nothing else happens. Is there anything else I have to do in addition to this?
I'm having the same problem. Unfortunately, it's not working as documented. :(
Since, the method is returning a promise, you can workaround like this:
EDIT: Events have been introduced with version 0.3. Which version are you using?