This is an automated email from the ASF dual-hosted git repository.

klesh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/main by this push:
     new f2d6205e8 fix(config-ui): remote search results are duplicated (#6275)
f2d6205e8 is described below

commit f2d6205e8729e85a01531726a72dffda19712f06
Author: 青湛 <[email protected]>
AuthorDate: Wed Oct 18 20:30:26 2023 +1300

    fix(config-ui): remote search results are duplicated (#6275)
---
 config-ui/src/plugins/components/data-scope-remote/search-remote.tsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/config-ui/src/plugins/components/data-scope-remote/search-remote.tsx 
b/config-ui/src/plugins/components/data-scope-remote/search-remote.tsx
index e0328c65b..4679ea6e8 100644
--- a/config-ui/src/plugins/components/data-scope-remote/search-remote.tsx
+++ b/config-ui/src/plugins/components/data-scope-remote/search-remote.tsx
@@ -108,14 +108,14 @@ export const SearchRemote = ({ plugin, connectionId, 
config, disabledScope, sele
       pageSize: 50,
     });
 
-    const newItems = (res.children ?? []).map((it) => ({
+    const items = (res.children ?? []).map((it) => ({
       ...it,
       title: it.name,
     }));
 
     setSearch((s) => ({
       ...s,
-      items: [...s.items, ...newItems],
+      items,
       total: res.count,
     }));
   };

Reply via email to