From 885b60f566f2f140d9d52f8844f74fbd1c7c2742 Mon Sep 17 00:00:00 2001 From: zhouwenxuan Date: Mon, 7 Apr 2025 11:23:50 +0800 Subject: [PATCH] fix tree data update failed when switch repo by click searched folder --- frontend/src/pages/lib-content-view/lib-content-view.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/pages/lib-content-view/lib-content-view.js b/frontend/src/pages/lib-content-view/lib-content-view.js index 9d71ce3cbb..f850684de4 100644 --- a/frontend/src/pages/lib-content-view/lib-content-view.js +++ b/frontend/src/pages/lib-content-view/lib-content-view.js @@ -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); }); }