Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add beforeLeave hook on router #1531

Open
wants to merge 1 commit into
base: v1
Choose a base branch
from

Conversation

DJafari
Copy link

@DJafari DJafari commented Apr 21, 2023

in some case we want doing a async work before inertia changed page

for example :
i have a form in modal, i want after form submited and result is success, before inertia navigate me to another page, hide my modal dialog

with this pr i can doing it by passing onBeforeLeave to VisitOptions

thanks

@jesusantguerrero
Copy link

Isn't onBefore hook covering that use case?

@Adesin-fr
Copy link

Not sure if this is the same that onBefore, but I'd like to use async on the onBefore event, and it is currently not awaiting it !

@joetannenbaum joetannenbaum changed the base branch from master to v1 October 9, 2024 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants