1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-14 06:11:16 +00:00

Fix the problem that you can\t click th superior after clicking the subordinate

This commit is contained in:
zxj96
2019-05-30 21:22:52 +08:00
parent f9953d1be4
commit d09b52ec82

View File

@@ -130,7 +130,7 @@ class RepoListItem extends React.Component {
} }
onRepoItemClick = () => { onRepoItemClick = () => {
if (!this.isCurrentRepo()) { if (!this.isCurrentRepo() || this.refs.itemActive.className !== 'item-info item-active') {
this.props.onRepoItemClick(this.props.repo); this.props.onRepoItemClick(this.props.repo);
} else { } else {
this.onToggleClick(); this.onToggleClick();
@@ -152,7 +152,7 @@ class RepoListItem extends React.Component {
return ( return (
<li className="file-chooser-item"> <li className="file-chooser-item">
<span className={`item-toggle fa ${this.state.isShowChildren ? 'fa-caret-down' : 'fa-caret-right'}`} onClick={this.onToggleClick}></span> <span className={`item-toggle fa ${this.state.isShowChildren ? 'fa-caret-down' : 'fa-caret-right'}`} onClick={this.onToggleClick}></span>
<span className={`item-info ${repoActive ? 'item-active' : ''}`} onClick={this.onRepoItemClick}> <span className={`item-info ${repoActive ? 'item-active' : ''}`} onClick={this.onRepoItemClick} ref='itemActive'>
<span className="icon far fa-folder"></span> <span className="icon far fa-folder"></span>
<span className="name user-select-none ellipsis">{this.props.repo.repo_name}</span> <span className="name user-select-none ellipsis">{this.props.repo.repo_name}</span>
</span> </span>