diff options
author | aravinths1 <aravinths@ami.com> | 2024-05-22 13:22:20 +0300 |
---|---|---|
committer | Kiran Kumar Ballapalli <kirankumarb@ami.com> | 2024-05-24 10:22:26 +0300 |
commit | b325541c0a76e04eff8d48e2dce1b0592e2632bc (patch) | |
tree | c49e9b4d83217db638878d5763d56a037dcb1583 | |
parent | 1ccd8873e423db6ed1ea8ff578cc18e40e110509 (diff) | |
download | webui-vue-b325541c0a76e04eff8d48e2dce1b0592e2632bc.tar.xz |
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>
-rw-r--r-- | src/router/index.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/router/index.js b/src/router/index.js index 5b6d9099..4e962fea 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -12,6 +12,9 @@ const router = new VueRouter({ base: process.env.BASE_URL, routes, linkExactActiveClass: 'nav-link--current', + scrollBehavior() { + return { x: 0, y: 0 }; + }, }); function allowRouterToNavigate(to, next, currentUserRole) { |