1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-08 18:30:53 +00:00

fix: search repo change

This commit is contained in:
杨国璇
2025-01-08 16:12:22 +08:00
parent cd9780dac1
commit d9c50d2568
2 changed files with 5 additions and 2 deletions

View File

@@ -88,7 +88,8 @@ export const MetadataProvider = ({ repoID, currentPath, repoInfo, selectMetadata
const errorMsg = Utils.getErrorMsg(error);
toaster.danger(errorMsg);
});
}, [repoID, enableMetadata]);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [enableMetadata]);
const getFirstView = useCallback(() => {
const firstViewNav = navigation.find(item => item.type === VIEWS_TYPE_VIEW);

View File

@@ -160,7 +160,9 @@ 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.calculatePara(nextProps);
});
}
}