mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-03 16:10:26 +00:00
fix: metadata gallery view toggle detail keep the current visible image (#6964)
Co-authored-by: 杨国璇 <ygx@Hello-word.local>
This commit is contained in:
@@ -7,7 +7,7 @@ import ObjectUtils from '../../metadata/utils/object-utils';
|
||||
import { MetadataContext } from '../../metadata';
|
||||
import { PRIVATE_FILE_TYPE } from '../../constants';
|
||||
|
||||
const DetailContainer = React.memo(({ repoID, path, dirent, currentRepoInfo, repoTags, fileTags, onClose, onFileTagChanged }) => {
|
||||
const Detail = React.memo(({ repoID, path, dirent, currentRepoInfo, repoTags, fileTags, onClose, onFileTagChanged }) => {
|
||||
const isView = useMemo(() => path.startsWith('/' + PRIVATE_FILE_TYPE.FILE_EXTENDED_PROPERTIES), [path]);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -61,7 +61,7 @@ const DetailContainer = React.memo(({ repoID, path, dirent, currentRepoInfo, rep
|
||||
return !isChanged;
|
||||
});
|
||||
|
||||
DetailContainer.propTypes = {
|
||||
Detail.propTypes = {
|
||||
repoID: PropTypes.string,
|
||||
path: PropTypes.string,
|
||||
dirent: PropTypes.object,
|
||||
@@ -72,4 +72,4 @@ DetailContainer.propTypes = {
|
||||
onFileTagChanged: PropTypes.func,
|
||||
};
|
||||
|
||||
export default DetailContainer;
|
||||
export default Detail;
|
Reference in New Issue
Block a user