diff --git a/frontend/src/components/shared-repo-list-view/shared-repo-list-view.js b/frontend/src/components/shared-repo-list-view/shared-repo-list-view.js index 0125a935c8..4d86eda354 100644 --- a/frontend/src/components/shared-repo-list-view/shared-repo-list-view.js +++ b/frontend/src/components/shared-repo-list-view/shared-repo-list-view.js @@ -26,6 +26,7 @@ const propTypes = { onMonitorRepo: PropTypes.func, theadHidden: PropTypes.bool, inAllLibs: PropTypes.bool, + onTransferRepo: PropTypes.func, }; class SharedRepoListView extends React.Component { diff --git a/frontend/src/pages/groups/group-view.js b/frontend/src/pages/groups/group-view.js index c5b9d8b33c..7e5de20f76 100644 --- a/frontend/src/pages/groups/group-view.js +++ b/frontend/src/pages/groups/group-view.js @@ -201,6 +201,14 @@ class GroupView extends React.Component { this.loadGroup(this.props.groupID); }; + onItemTransfer = (repoId, groupID, owner) => { + let repoList = this.state.repoList.filter(item => { + return item.repo_id !== repoId; + }); + this.setState({ repoList: repoList }); + this.loadGroup(this.props.groupID); + }; + addRepoItem = (repo) => { let newRepoList = this.state.repoList.map(item => {return item;}); newRepoList.unshift(repo); @@ -445,6 +453,7 @@ class GroupView extends React.Component { onItemDelete={this.onItemDelete} onItemRename={this.onItemRename} onMonitorRepo={this.onMonitorRepo} + onTransferRepo={this.onItemTransfer} /> }