Sfoglia il codice sorgente

:bug: update没有发消息

visuddhinanda 3 anni fa
parent
commit
d2880c352e
1 ha cambiato i file con 6 aggiunte e 1 eliminazioni
  1. 6 1
      dashboard/src/components/term/TermModal.tsx

+ 6 - 1
dashboard/src/components/term/TermModal.tsx

@@ -48,7 +48,12 @@ const Widget = ({
           word={word}
           studioName={studioName}
           channelId={channelId}
-          onUpdate={handleOk}
+          onUpdate={() => {
+            setIsModalOpen(false);
+            if (typeof onUpdate !== "undefined") {
+              onUpdate();
+            }
+          }}
         />
       </Modal>
     </>