fix: optimize the Transfer

Optimize the UE of the Transfer component, when click the row of the right table in the Transfer, the row's selection can be changed. Optimized operations: project manage user, project manage user group, set project when create user

Change-Id: I932ce902f146072b46c05519e3e1f94db6556ff0
This commit is contained in:
Jingwei.Zhang 2023-05-05 10:43:43 +08:00
parent ce254bd808
commit 614d837075
3 changed files with 21 additions and 3 deletions

View File

@ -130,6 +130,12 @@ export class ManageUser extends ModalAction {
];
}
onClickSelect = (e) => {
if (e && e.stopPropagation) {
e.stopPropagation();
}
};
renderSelect = (id) => {
return (
<Select
@ -141,6 +147,7 @@ export class ManageUser extends ModalAction {
onChange={(value, option) => {
this.onSelectChange(value, option, id);
}}
onClick={this.onClickSelect}
/>
);
};
@ -206,7 +213,6 @@ export class ManageUser extends ModalAction {
filterOption: transferFilterOption,
wrapperCol: this.wrapperCol,
loading: this.userStore.list.isLoading,
onRowRight: () => null,
},
];
}

View File

@ -118,6 +118,12 @@ export class ManageUserGroup extends ModalAction {
return nameDomainColumns;
}
onClickSelect = (e) => {
if (e && e.stopPropagation) {
e.stopPropagation();
}
};
renderSelect = (groupId) => {
return (
<Select
@ -129,6 +135,7 @@ export class ManageUserGroup extends ModalAction {
onChange={(value, option) => {
this.onSubChange(value, option, groupId);
}}
onClick={this.onClickSelect}
/>
);
};
@ -206,7 +213,6 @@ export class ManageUserGroup extends ModalAction {
onChange: this.onChangeUserGroup,
wrapperCol: this.wrapperCol,
loading: this.userGroupStore.list.isLoading,
onRowRight: () => null,
},
];
}

View File

@ -161,6 +161,12 @@ export class Create extends FormAction {
this.setState({ projectRoles });
};
onClickSelect = (e) => {
if (e && e.stopPropagation) {
e.stopPropagation();
}
};
renderSelect = (projectId) => {
return (
<Select
@ -172,6 +178,7 @@ export class Create extends FormAction {
onChange={(value, option) => {
this.onSelectChange(value, option, projectId);
}}
onClick={this.onClickSelect}
/>
);
};
@ -332,7 +339,6 @@ export class Create extends FormAction {
onChange: this.onChangeProject,
filterOption: transferFilterOption,
loading: this.projectStore.list.isLoading,
onRowRight: () => null,
},
{
name: 'select_user_group',