You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by kl...@apache.org on 2023/12/07 03:49:11 UTC

(incubator-devlake) branch main updated: fix(config-ui): group and scope id are duplicated in gitlab (#6580)

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 34ecfcf2d fix(config-ui): group and scope id are duplicated in gitlab (#6580)
34ecfcf2d is described below

commit 34ecfcf2d287ec340646fec1c3e35ac63cb1e2d8
Author: 青湛 <0x...@gmail.com>
AuthorDate: Thu Dec 7 11:49:06 2023 +0800

    fix(config-ui): group and scope id are duplicated in gitlab (#6580)
---
 .../src/plugins/components/data-scope-remote/search-remote.tsx   | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

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 399d64182..8101a7245 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
@@ -71,7 +71,14 @@ export const SearchRemote = ({ plugin, connectionId, config, disabledScope, sele
     [selectedScope],
   );
 
-  const allItems = useMemo(() => uniqBy([...miller.items, ...search.items], 'id'), [miller.items, search.items]);
+  const allItems = useMemo(
+    () =>
+      uniqBy(
+        [...miller.items, ...search.items].filter((it) => it.type === 'scope'),
+        'id',
+      ),
+    [miller.items, search.items],
+  );
 
   const getItems = async (groupId: ID | null, currentPageToken?: string) => {
     let newItems: McsItem<T.ResItem>[] = [];