1
0
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:
zhouwenxuan
2025-04-07 11:23:50 +08:00
parent 272010d55f
commit 885b60f566

View File

@@ -223,7 +223,8 @@ class LibContentView extends React.Component {
UNSAFE_componentWillReceiveProps(nextProps) {
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);
});
}