1
0
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:
杨国璇
2024-10-29 17:52:44 +08:00
committed by GitHub
parent 2e7e5f41f9
commit 6a91658638
5 changed files with 103 additions and 21 deletions

View File

@@ -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;