This is an automated email from the ASF dual-hosted git repository. mintsweet pushed a commit to branch fix-data-scope-remote-search in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
commit fbf6614460ad7cd26d6d32151c0a27ab6235ab71 Author: mintsweet <[email protected]> AuthorDate: Wed Oct 18 20:28:22 2023 +1300 fix(config-ui): remote search results are duplicated --- 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, })); };
