瀏覽代碼

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;