aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmbroise C <ambroise.christea@sonarsource.com>2024-01-16 17:48:52 +0100
committersonartech <sonartech@sonarsource.com>2024-01-17 20:02:43 +0000
commit813513987795033d5c24f980adddc949e3b640e2 (patch)
tree1013274f388e4fcb253f31baa1b236b38d266c75
parent23992cc084b4f2b5a34f523c6a1c4587387c2c68 (diff)
downloadsonarqube-813513987795033d5c24f980adddc949e3b640e2.tar.gz
sonarqube-813513987795033d5c24f980adddc949e3b640e2.zip
SONAR-21238 Fix locations not always displayed when opening the first data flow of an issue
-rw-r--r--server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/CrossComponentSourceViewer.tsx3
1 files changed, 1 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/CrossComponentSourceViewer.tsx b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/CrossComponentSourceViewer.tsx
index bdd33815d57..972d8041e8f 100644
--- a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/CrossComponentSourceViewer.tsx
+++ b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/CrossComponentSourceViewer.tsx
@@ -223,8 +223,7 @@ export default class CrossComponentSourceViewer extends React.PureComponent<Prop
{locationsByComponent.map((snippetGroup, i) => {
return (
<SourceViewerContext.Provider
- // eslint-disable-next-line react/no-array-index-key
- key={`${issue.key}-${this.props.selectedFlowIndex || 0}-${i}`}
+ key={`${issue.key}-${this.props.selectedFlowIndex}-${snippetGroup.component.key}`}
value={{ branchLike: this.props.branchLike, file: snippetGroup.component }}
>
<ComponentSourceSnippetGroupViewer