1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-11 03:41:12 +00:00

fix create new folder (#7016)

* optimize code

* optimize code

---------

Co-authored-by: zhouwenxuan <aries@Mac.local>
This commit is contained in:
Aries
2024-11-11 15:26:56 +08:00
committed by GitHub
parent 15857ac567
commit 20d6828d00
8 changed files with 179 additions and 164 deletions

View File

@@ -8,7 +8,7 @@ const propTypes = {
repo: PropTypes.object,
repoList: PropTypes.array,
selectedRepo: PropTypes.object,
initToShowChildren: PropTypes.bool.isRequired,
initToShowChildren: PropTypes.bool,
selectedPath: PropTypes.string,
onDirentItemClick: PropTypes.func.isRequired,
onRepoItemClick: PropTypes.func.isRequired,
@@ -34,7 +34,7 @@ const defaultProps = {
class RepoListView extends React.Component {
render() {
let { currentRepoInfo, currentPath, repoList, selectedSearchedRepo } = this.props;
let { currentRepoInfo, currentPath, repoList, selectedSearchedRepo, initToShowChildren } = this.props;
if (currentRepoInfo) {
repoList = [];
repoList.push(currentRepoInfo);
@@ -54,7 +54,7 @@ class RepoListView extends React.Component {
isCurrentRepo={currentRepoInfo ? true : false}
currentPath={currentPath}
repo={repoItem}
initToShowChildren={this.props.initToShowChildren}
initToShowChildren={initToShowChildren}
selectedRepo={this.props.selectedRepo}
selectedPath={this.props.selectedPath}
onRepoItemClick={this.props.onRepoItemClick}