Explorar o código

resId改变时,回到列表

visuddhinanda hai 11 meses
pai
achega
cd8598c800

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

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