diff options
author | Mathieu Suen <mathieu.suen@sonarsource.com> | 2022-06-02 12:14:31 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2022-06-02 20:03:18 +0000 |
commit | 10765dd52e9173fee3f50b48de911297d513cd74 (patch) | |
tree | 35ae489666513adf2be728bb914294cb1c20ab85 | |
parent | 061b7f9abf85c6f1986c526358f2e5cc3bc8c92b (diff) | |
download | sonarqube-10765dd52e9173fee3f50b48de911297d513cd74.tar.gz sonarqube-10765dd52e9173fee3f50b48de911297d513cd74.zip |
SONAR-16456 Remove expand button on non file header
-rw-r--r-- | server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/ComponentSourceSnippetGroupViewer.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/ComponentSourceSnippetGroupViewer.tsx b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/ComponentSourceSnippetGroupViewer.tsx index 2fe03336c70..00a82856a42 100644 --- a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/ComponentSourceSnippetGroupViewer.tsx +++ b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/ComponentSourceSnippetGroupViewer.tsx @@ -26,6 +26,7 @@ import { locationsByLine } from '../../../components/SourceViewer/helpers/indexi import SourceViewerHeaderSlim from '../../../components/SourceViewer/SourceViewerHeaderSlim'; import { getBranchLikeQuery } from '../../../helpers/branch-like'; import { BranchLike } from '../../../types/branch-like'; +import { isFile } from '../../../types/component'; import { Dict, Duplication, @@ -423,7 +424,7 @@ export default class ComponentSourceSnippetGroupViewer extends React.PureCompone <div className="component-source-container" ref={this.rootNodeRef}> <SourceViewerHeaderSlim branchLike={branchLike} - expandable={!fullyShown} + expandable={!fullyShown && isFile(snippetGroup.component.q)} loading={loading} onExpand={this.expandComponent} sourceViewerFile={snippetGroup.component} |