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:
@@ -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);
|
||||
|
@@ -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);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user