[Vuejs]-Inertiajs – Asynch Redirect

0👍

Not sure if I understand what you’re looking for.

onSuccess runs immediately after the post request has finished AND in successful. It is completely separated from other links and it’s purpose (if your returning a Promise from it) is to delay the execution of the onFinish handler.

From the docs:

It’s also possible to return a promise from the onSuccess() and
onError() callbacks. This will delay the "finish" event until the
promise has resolved.

I also believe there’s some problem in your code: Promise.all should receive an array os Promises and I’m pretty sure window.Toast.success(page.props.toast) isn’t returning one, is it?

So… chances are that your Promise.all is never resolving.

Leave a comment