mirror of
https://github.com/haiwen/seahub.git
synced 2025-07-31 22:57:47 +00:00
fix select bug when admin share repo to group (#5931)
This commit is contained in:
parent
f5fdebe5bb
commit
690d4a6a8c
@ -172,10 +172,8 @@ class SysAdminShareToGroup extends React.Component {
|
|||||||
shareToGroup = () => {
|
shareToGroup = () => {
|
||||||
let groups = [];
|
let groups = [];
|
||||||
let repoID = this.props.repoID;
|
let repoID = this.props.repoID;
|
||||||
if (this.state.selectedOption && this.state.selectedOption.length > 0 ) {
|
if (this.state.selectedOption) {
|
||||||
for (let i = 0; i < this.state.selectedOption.length; i ++) {
|
groups[0] = this.state.selectedOption.id;
|
||||||
groups[i] = this.state.selectedOption[i].id;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
seafileAPI.sysAdminAddRepoSharedItem(repoID, 'group', groups, this.state.permission).then(res => {
|
seafileAPI.sysAdminAddRepoSharedItem(repoID, 'group', groups, this.state.permission).then(res => {
|
||||||
let errorMsg = [];
|
let errorMsg = [];
|
||||||
|
Loading…
Reference in New Issue
Block a user