Просмотр исходного кода

TypeArticle TypeAnthology add onTitle

visuddhinanda 2 лет назад
Родитель
Сommit
6907476fd1
1 измененных файлов с 8 добавлено и 0 удалено
  1. 8 0
      dashboard/src/components/article/Article.tsx

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

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