1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-07 01:41:39 +00:00

fix org department add member (#6686)

This commit is contained in:
Michael An
2024-09-02 16:16:56 +08:00
committed by GitHub
parent c05902f22d
commit b4059f9bf7

View File

@@ -21,17 +21,15 @@ class AddMemberDialog extends React.Component {
selectedOption: null, selectedOption: null,
errMessage: '', errMessage: '',
}; };
this.Options = [];
} }
handleSelectChange = (option) => { handleSelectChange = (option) => {
this.setState({ selectedOption: option }); this.setState({ selectedOption: option });
this.Options = [];
}; };
handleSubmit = () => { handleSubmit = () => {
if (!this.state.selectedOption) return; if (!this.state.selectedOption) return;
const email = this.state.selectedOption.email; const email = this.state.selectedOption[0].email;
this.refs.orgSelect.clearSelect(); this.refs.orgSelect.clearSelect();
this.setState({ errMessage: [] }); this.setState({ errMessage: [] });
seafileAPI.orgAdminAddGroupMember(orgID, this.props.groupID, email).then((res) => { seafileAPI.orgAdminAddGroupMember(orgID, this.props.groupID, email).then((res) => {