소스 검색

support only refresh selected collection

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

+ 8 - 2
client/src/pages/collections/Collections.tsx

@@ -311,8 +311,14 @@ const Collections = () => {
       type: 'button',
       btnVariant: 'text',
       onClick: () => {
-        clearIndexCache();
-        fetchCollections();
+        if (selectedCollections.length > 0) {
+          for (const collection of selectedCollections) {
+            fetchCollection(collection.collection_name);
+          }
+        } else {
+          clearIndexCache();
+          fetchCollections();
+        }
       },
       disabled: () => {
         return loading;