Browse Source

support only refresh selected collection

Signed-off-by: ryjiang <jiangruiyi@gmail.com>
ryjiang 1 year ago
parent
commit
1ba20b859d
1 changed files with 8 additions and 2 deletions
  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',
       type: 'button',
       btnVariant: 'text',
       btnVariant: 'text',
       onClick: () => {
       onClick: () => {
-        clearIndexCache();
-        fetchCollections();
+        if (selectedCollections.length > 0) {
+          for (const collection of selectedCollections) {
+            fetchCollection(collection.collection_name);
+          }
+        } else {
+          clearIndexCache();
+          fetchCollections();
+        }
       },
       },
       disabled: () => {
       disabled: () => {
         return loading;
         return loading;