Explorar el Código

add onArticleChange

visuddhinanda hace 2 años
padre
commit
0fc72436d9
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  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}
         anthologyId={anthologyId}
         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) => {}}
         onAnthologySelect={(id: string) => {}}
       />