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
Hi,
I am using Dialog.create() method to fire a dialog on route change. The dialog component has a watcher that detects if anything changed in form and it supposes to let user know before route change that there are unsaved changes. However onBeforeRouteLeave guard does not trigger in component, I get the following warning in browser:
[Vue Router warn]: No active route record was found when callingonBeforeRouteLeave(). Make sure you call this function inside a component child of <router-view>. Maybe you called it inside of App.vue?
Is it because Dialog.create() using different scope which isn't within router-view? Is there any way to make it working, or any alternative that would trigger before dialog that can be called within dialog component?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I am using Dialog.create() method to fire a dialog on route change. The dialog component has a watcher that detects if anything changed in form and it supposes to let user know before route change that there are unsaved changes. However onBeforeRouteLeave guard does not trigger in component, I get the following warning in browser:
[Vue Router warn]: No active route record was found when calling
onBeforeRouteLeave(). Make sure you call this function inside a component child of <router-view>. Maybe you called it inside of App.vue?
Is it because Dialog.create() using different scope which isn't within router-view? Is there any way to make it working, or any alternative that would trigger before dialog that can be called within dialog component?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions