소스 검색

resId改变时,回到列表

visuddhinanda 1 년 전
부모
커밋
cd8598c800
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      dashboard-v4/dashboard/src/components/discussion/Discussion.tsx

+ 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);