From 5c00fa260752420d1ab8124e4a6455d52e652f53 Mon Sep 17 00:00:00 2001 From: Michael An <2331806369@qq.com> Date: Tue, 15 Oct 2024 15:21:20 +0800 Subject: [PATCH] fix metadata search file (#6901) --- frontend/src/components/search/search.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/search/search.js b/frontend/src/components/search/search.js index e4f3777c3b..11495b353c 100644 --- a/frontend/src/components/search/search.js +++ b/frontend/src/components/search/search.js @@ -12,6 +12,7 @@ import { Utils } from '../../utils/utils'; import toaster from '../toast'; import Loading from '../loading'; import { SEARCH_MASK, SEARCH_CONTAINER } from '../../constants/zIndexes'; +import { PRIVATE_FILE_TYPE } from '../../constants'; const propTypes = { repoID: PropTypes.string, @@ -604,7 +605,9 @@ class Search extends Component { ); } if (this.props.repoID) { - if (this.props.path && this.props.path !== '/' && !this.props.isViewFile) { + const { path } = this.props; + const isMetadataView = path && path.startsWith('/' + PRIVATE_FILE_TYPE.FILE_EXTENDED_PROPERTIES); + if (path && path !== '/' && !this.props.isViewFile && !isMetadataView) { return (