Fixed Scroll top issue between page navigation
After scrolling down a page and navigating from that page to
other pages, the page still shows the bottom of the page and does not
display the top of the page.
Scroll behavior added in the router, So when navigating from one page
to another page the top of the page will always display.
Change-Id: I883e8a9f6ae3f98846996883cac0961b4c24c62b
Signed-off-by: aravinths1 <aravinths@ami.com>
diff --git a/src/router/index.js b/src/router/index.js
index 5b6d909..4e962fe 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -12,6 +12,9 @@
base: process.env.BASE_URL,
routes,
linkExactActiveClass: 'nav-link--current',
+ scrollBehavior() {
+ return { x: 0, y: 0 };
+ },
});
function allowRouterToNavigate(to, next, currentUserRole) {