From 039feef618168e860406c7a83a6d23c10340a65f Mon Sep 17 00:00:00 2001 From: Philip Adenekan Date: Fri, 27 Aug 2021 15:56:21 -0700 Subject: [PATCH] ENCD-6126--add-element-ref-to-file-details --- src/encoded/static/components/filegallery.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/encoded/static/components/filegallery.js b/src/encoded/static/components/filegallery.js index 6167526e5a4..631ea8fb3b7 100644 --- a/src/encoded/static/components/filegallery.js +++ b/src/encoded/static/components/filegallery.js @@ -463,6 +463,13 @@ export class FileTable extends React.Component { return analysisObjectsAccession || nonAnalysisObjectPrefix; }); + const elementsReferences = context.elements_references; + + if (elementsReferences) { + const elementsReferenceFiles = elementsReferences.map((elementsReference) => elementsReference.files).reduce((acc, val) => acc.concat(val), []); + files.ref?.concat(elementsReferenceFiles); + } + // Get unique analyses for series object const analysesSeries = files.series ? [...new Set(files.series.map((a) => (a.analyses && a.analyses.length > 0 ? a.analyses[0] : '')).filter((a) => a !== ''))] : [];