Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

Add scrollToAnchor support

Tianzhou Chen65dcad3cec67
diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts
index 000242a80a..ca690d6191 100644
--- a/frontend/src/router/index.ts
+++ b/frontend/src/router/index.ts
@@ -247,6 +247,14 @@ export const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes,
linkExactActiveClass: "bg-link-hover",
+ scrollBehavior(to, from, savedPosition) {
+ if (to.hash) {
+ return {
+ el: to.hash,
+ behavior: "smooth",
+ };
+ }
+ },
});
router.beforeEach((to, from, next) => {