visuddhinanda 2 лет назад
Родитель
Сommit
1c0f33532b
1 измененных файлов с 5 добавлено и 0 удалено
  1. 5 0
      dashboard/src/components/template/SentEdit/SentCanRead.tsx

+ 5 - 0
dashboard/src/components/template/SentEdit/SentCanRead.tsx

@@ -22,6 +22,7 @@ interface IWidget {
   channelsId?: string[];
   channelsId?: string[];
   reload?: boolean;
   reload?: boolean;
   onReload?: Function;
   onReload?: Function;
+  onCreate?: Function;
 }
 }
 const SentCanReadWidget = ({
 const SentCanReadWidget = ({
   book,
   book,
@@ -32,6 +33,7 @@ const SentCanReadWidget = ({
   channelsId,
   channelsId,
   reload = false,
   reload = false,
   onReload,
   onReload,
+  onCreate,
 }: IWidget) => {
 }: IWidget) => {
   const [sentData, setSentData] = useState<ISentence[]>([]);
   const [sentData, setSentData] = useState<ISentence[]>([]);
   const [channels, setChannels] = useState<string[]>();
   const [channels, setChannels] = useState<string[]>();
@@ -140,6 +142,9 @@ const SentCanReadWidget = ({
               return [newSent.channel.id];
               return [newSent.channel.id];
             }
             }
           });
           });
+          if (typeof onCreate !== "undefined") {
+            onCreate();
+          }
         }}
         }}
       />
       />