소스 검색

fix segment page is not set as active after refershing the page

Signed-off-by: ryjiang <jiangruiyi@gmail.com>
ryjiang 1 년 전
부모
커밋
a98e5aaf8d
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      client/src/pages/databases/Databases.tsx

+ 3 - 3
client/src/pages/databases/Databases.tsx

@@ -175,9 +175,6 @@ const CollectionTabs = (props: {
     },
   ];
 
-  // get active collection tab
-  const activeColTab = collectionTabs.findIndex(t => t.path === collectionPage);
-
   if (!isManaged) {
     collectionTabs.push({
       label: collectionTrans('segmentsTab'),
@@ -186,6 +183,9 @@ const CollectionTabs = (props: {
     });
   }
 
+  // get active collection tab
+  const activeColTab = collectionTabs.findIndex(t => t.path === collectionPage);
+
   return (
     <RouteTabList
       tabs={collectionTabs}