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

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

commit 74e0baf540c84a4c747185af789b9af9a466fa7b
Author: mintsweet <0x1304...@gmail.com>
AuthorDate: Thu Sep 26 21:36:18 2024 +1200

    fix: data scope search cannot select
---
 .../src/plugins/components/data-scope-remote/search-local.tsx  | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git 
a/config-ui/src/plugins/components/data-scope-remote/search-local.tsx 
b/config-ui/src/plugins/components/data-scope-remote/search-local.tsx
index 67b8f4a7f..31c126db3 100644
--- a/config-ui/src/plugins/components/data-scope-remote/search-local.tsx
+++ b/config-ui/src/plugins/components/data-scope-remote/search-local.tsx
@@ -104,9 +104,7 @@ export const SearchLocal = ({ mode, plugin, connectionId, 
config, disabledScope,
     async (groupId?: string | number) => {
       return {
         data: searchDebounce
-          ? scope
-              .filter((it) => it.title.includes(searchDebounce) && 
!it.canExpand)
-              .map((it) => ({ ...it, parentId: null }))
+          ? scope.filter((it) => it.title.includes(searchDebounce) && 
!it.canExpand)
           : scope.filter((it) => it.parentId === (groupId ?? null)),
         hasMore: false,
       };
@@ -238,7 +236,11 @@ export const SearchLocal = ({ mode, plugin, connectionId, 
config, disabledScope,
               selectable
               disabledIds={(disabledScope ?? []).map((it) => it.id)}
               selectedIds={selectedScope.map((it) => it.id)}
-              onSelectedIds={(_, data) => onChange(data ?? [])}
+              onSelectedIds={(_, data) => {
+                console.log(_);
+                console.log(data);
+                onChange(data ?? []);
+              }}
             />
           </>
         )}

Reply via email to