Răsfoiți Sursa

add onArticleChange

visuddhinanda 2 ani în urmă
părinte
comite
0fc72436d9
1 a modificat fișierele cu 5 adăugiri și 1 ștergeri
  1. 5 1
      dashboard/src/components/article/TypeCourse.tsx

+ 5 - 1
dashboard/src/components/article/TypeCourse.tsx

@@ -209,7 +209,11 @@ const TypeCourseWidget = ({
         mode={mode}
         mode={mode}
         anthologyId={anthologyId}
         anthologyId={anthologyId}
         active={true}
         active={true}
-        onArticleChange={(type: ArticleType, id: string, target: string) => {}}
+        onArticleChange={(type: ArticleType, id: string, target: string) => {
+          if (typeof onArticleChange !== "undefined") {
+            onArticleChange(type, id, target);
+          }
+        }}
         onLoad={(data: IArticleDataResponse) => {}}
         onLoad={(data: IArticleDataResponse) => {}}
         onAnthologySelect={(id: string) => {}}
         onAnthologySelect={(id: string) => {}}
       />
       />