Skip to content

Commit 71484f5

Browse files
committed
Add JS to scroll down after menu link click
1 parent a21b8e0 commit 71484f5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ui/src/components/Sidebar.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export default function Sidebar(props: Props) {
3131
<AnchorLink href={'#' + lrdDocsItem.http_method + lrdDocsItem.uri}
3232
onClick={() => {
3333
window.history.pushState({}, '', '#' + lrdDocsItem.http_method + lrdDocsItem.uri);
34+
setTimeout(() => {window.scrollBy(0, -128)}, 600);
3435
}}
3536
className="flex flex-row px-0 py-1">
3637
<span className={`method-${lrdDocsItem.http_method} uppercase text-xs w-12 p-0 flex flex-row-reverse`}>

0 commit comments

Comments
 (0)