You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by li...@apache.org on 2023/01/05 02:24:01 UTC

[incubator-devlake] branch main updated: fix(config-ui): data scope cannot select on gitlab and jira (#4109)

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

likyh 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 7a00ae0bc fix(config-ui): data scope cannot select on gitlab and jira (#4109)
7a00ae0bc is described below

commit 7a00ae0bc5f06cffe86726d568259e6e32c9da1f
Author: 青湛 <0x...@gmail.com>
AuthorDate: Thu Jan 5 10:23:57 2023 +0800

    fix(config-ui): data scope cannot select on gitlab and jira (#4109)
---
 config-ui/src/plugins/gitlab/components/miller-columns/index.tsx | 2 +-
 config-ui/src/plugins/jira/data-scope.tsx                        | 9 +++++++--
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/config-ui/src/plugins/gitlab/components/miller-columns/index.tsx b/config-ui/src/plugins/gitlab/components/miller-columns/index.tsx
index e0719e5c2..9dfb0f72f 100644
--- a/config-ui/src/plugins/gitlab/components/miller-columns/index.tsx
+++ b/config-ui/src/plugins/gitlab/components/miller-columns/index.tsx
@@ -47,7 +47,7 @@ export const MillerColumns = ({ connectionId, disabledItems, selectedItems, onCh
 
   useEffect(() => {
     setSelectedIds((selectedItems ?? []).map((it) => it.gitlabId));
-  }, []);
+  }, [selectedItems]);
 
   const handleChangeItems = (selectedIds: ID[]) => {
     const result = items
diff --git a/config-ui/src/plugins/jira/data-scope.tsx b/config-ui/src/plugins/jira/data-scope.tsx
index 0586a563c..d0855bf71 100644
--- a/config-ui/src/plugins/jira/data-scope.tsx
+++ b/config-ui/src/plugins/jira/data-scope.tsx
@@ -29,12 +29,17 @@ interface Props {
   onChangeItems: (selectedItems: ScopeItemType[]) => void;
 }
 
-export const JIRADataScope = ({ connectionId, disabledItems, onChangeItems }: Props) => {
+export const JIRADataScope = ({ connectionId, disabledItems, selectedItems, onChangeItems }: Props) => {
   return (
     <>
       <h3>Boards *</h3>
       <p>Select the boards you would like to sync.</p>
-      <MillerColumns connectionId={connectionId} disabledItems={disabledItems} onChangeItems={onChangeItems} />
+      <MillerColumns
+        connectionId={connectionId}
+        disabledItems={disabledItems}
+        selectedItems={selectedItems}
+        onChangeItems={onChangeItems}
+      />
     </>
   );
 };