Ver Fonte

resId改变时,回到列表

visuddhinanda há 1 ano atrás
pai
commit
cd8598c800

+ 4 - 0
dashboard-v4/dashboard/src/components/discussion/Discussion.tsx

@@ -51,6 +51,10 @@ const DiscussionWidget = ({
     }
     }
   }, [showTopicId]);
   }, [showTopicId]);
 
 
+  useEffect(() => {
+    setChildrenDrawer(false);
+  }, [resId]);
+
   const showChildrenDrawer = (comment: IComment) => {
   const showChildrenDrawer = (comment: IComment) => {
     console.debug("discussion comment", comment);
     console.debug("discussion comment", comment);
     setChildrenDrawer(true);
     setChildrenDrawer(true);