mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-26 15:26:19 +00:00
fix tree data update failed when switch repo by click searched folder
This commit is contained in:
@@ -223,7 +223,8 @@ class LibContentView extends React.Component {
|
|||||||
|
|
||||||
UNSAFE_componentWillReceiveProps(nextProps) {
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
||||||
if (nextProps.repoID !== this.props.repoID) {
|
if (nextProps.repoID !== this.props.repoID) {
|
||||||
this.setState({ path: '/', viewId: '', tagID: '', currentMode: cookie.load('seafile_view_mode') || LIST_MODE }, () => {
|
this.isRepoChanged = true;
|
||||||
|
this.setState({ path: '/', viewId: '', tagID: '', currentMode: cookie.load('seafile_view_mode') || LIST_MODE, treeData: treeHelper.buildTree() }, () => {
|
||||||
this.calculatePara(nextProps);
|
this.calculatePara(nextProps);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user