Prechádzať zdrojové kódy

TypeArticle TypeAnthology add onTitle

visuddhinanda 2 rokov pred
rodič
commit
6907476fd1

+ 8 - 0
dashboard/src/components/article/Article.tsx

@@ -97,6 +97,9 @@ const ArticleWidget = ({
             if (typeof onLoad !== "undefined") {
             if (typeof onLoad !== "undefined") {
               onLoad(data);
               onLoad(data);
             }
             }
+            if (typeof onTitle !== "undefined") {
+              onTitle(data.title);
+            }
           }}
           }}
           onAnthologySelect={(id: string) => {
           onAnthologySelect={(id: string) => {
             if (typeof onAnthologySelect !== "undefined") {
             if (typeof onAnthologySelect !== "undefined") {
@@ -114,6 +117,11 @@ const ArticleWidget = ({
               onArticleChange(type, id, target);
               onArticleChange(type, id, target);
             }
             }
           }}
           }}
+          onTitle={(value: string) => {
+            if (typeof onTitle !== "undefined") {
+              onTitle(value);
+            }
+          }}
         />
         />
       ) : type === "term" ? (
       ) : type === "term" ? (
         <TypeTerm
         <TypeTerm