Преглед изворни кода

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;