Provide prevMatch / nextMatch params to onEnter / onLeave #1695
Closed
ryanking1809
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
shouldn't this functionality rather be implemented using https://tanstack.com/router/v1/docs/framework/react/guide/navigation-blocking |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a project route with tabs which I use search params to navigate eg.
project/$id?tab=tasks
project/$id?tab=notes
project/$id?tab=roles
I want to warn the user if they leave without saving. However
onLeave
triggers on navigating between tabs (perhaps I've set something up incorrectly) and it only needed once a user leaves the project route.Is it possible to add
nextMatch
to the params foronLeave
? I currently import the router and it feels a bit off.Perhaps this would be nicer as
Beta Was this translation helpful? Give feedback.
All reactions