Explorar o código

add onArticleChange

visuddhinanda %!s(int64=2) %!d(string=hai) anos
pai
achega
0fc72436d9
Modificáronse 1 ficheiros con 5 adicións e 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) => {}}
       />