Explorar o código

scrollToTop on onArticleChange

visuddhinanda %!s(int64=2) %!d(string=hai) anos
pai
achega
7dfcc719c6
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      dashboard/src/pages/library/article/show.tsx

+ 1 - 1
dashboard/src/pages/library/article/show.tsx

@@ -340,7 +340,7 @@ const Widget = () => {
                 target?: string
               ) => {
                 console.log("article change", newType, article, target);
-
+                scrollToTop();
                 let url = `/article/${newType}/${article}?mode=${currMode}`;
                 searchParams.forEach((value, key) => {
                   console.log(value, key);