You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Should an enabled navigation guard also prevent navigation through router.push (where router = useRouter() from next/navigation)?
If it should, I'm seeing a bug. The enabled navigation guard shows the confirm dialog when clicking browser back, but does not show, when navigating using router.push(...).
I enabled the guard using useNavigationGuard({ enabled: formHasChanges, confirm: () => window.confirm('You have unsaved changes that will be lost.') });.
The text was updated successfully, but these errors were encountered:
Should an enabled navigation guard also prevent navigation through
router.push
(whererouter = useRouter()
fromnext/navigation
)?If it should, I'm seeing a bug. The enabled navigation guard shows the confirm dialog when clicking browser back, but does not show, when navigating using
router.push(...)
.I enabled the guard using
useNavigationGuard({ enabled: formHasChanges, confirm: () => window.confirm('You have unsaved changes that will be lost.') });
.The text was updated successfully, but these errors were encountered: