1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-22 11:57:34 +00:00

dirent list view update info

This commit is contained in:
wangjianhui
2018-12-12 21:42:23 +08:00
parent 701ca86ee0
commit d6aa80c72e
7 changed files with 54 additions and 6 deletions

View File

@@ -34,6 +34,7 @@ class DirView extends React.Component {
currentRepoInfo: null,
direntList: [],
selectedDirentList: [],
dirID: '',
};
window.onpopstate = this.onpopstate;
}
@@ -73,12 +74,13 @@ class DirView extends React.Component {
let repoID = this.state.repoID;
this.setState({isDirentListLoading: true});
seafileAPI.listDir(repoID, filePath).then(res => {
let direntList = res.data.map(item => {
let direntList = res.data.data.map(item => {
return new Dirent(item);
});
this.setState({
isDirentListLoading: false,
direntList: direntList,
dirID: res.data.oid,
});
}).catch(() => {
this.setState({pathExist: false});
@@ -460,6 +462,7 @@ class DirView extends React.Component {
render() {
return (
<DirPanel
dirID={this.state.dirID}
pathPrefix={this.props.pathPrefix}
currentRepoInfo={this.state.currentRepoInfo}
path={this.state.path}