"Inertia way" for handling back? #2234
Unanswered
AtteR
asked this question in
Help (Vue)
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
Consider the following flow:
projects.index -> projects.show -> projects.edit
So user goes from projects list, to viewing details of the project and from there to edit.
This works nicely, but what if we want to redirect user back to the projects.show with new data from edit? So for example user edits the project (with a form), clicks "Save" and they should be redirected back to the projects.show page.
For me this causes the history be like this (if used router.visit() with replace from edits -> show on form.onSuccess()):
projects.index -> projects.show (old data) -> projects.show (new data)
I could use replace when going from index to show and from show to edit, but in that case the history might become projects.index -> projects.edit, if user uses going back directly from browser history
Is there any way to redirect user back to the projects.show with new data while dropping the projects.edit from the history? So the history would be simply like this:
projects.index -> projects.show
Am I missing something in the code or is my UX design bad here?
Hopefully my explanation is clear.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions