refs #
[arvados-workbench2.git] / src / views-components / collection-panel-files / collection-panel-files.ts
index 7836e1f794d2436e7f49a5742b9a4071f3920fc1..e5983b6bfe903abfea5c17e509b6aa1ebad1bf2d 100644 (file)
@@ -29,14 +29,15 @@ const memoizedMapStateToProps = () => {
     let prevState: CollectionPanelFilesState;
     let prevTree: Array<TreeItem<FileTreeData>>;
 
-    return (state: RootState): Pick<CollectionPanelFilesProps, "items"> => {
+    return (state: RootState): Pick<CollectionPanelFilesProps, "items" | "currentItemUuid"> => {
         if (prevState !== state.collectionPanelFiles) {
             prevState = state.collectionPanelFiles;
             prevTree = getNodeChildrenIds('')(state.collectionPanelFiles)
                 .map(collectionItemToTreeItem(state.collectionPanelFiles));
         }
         return {
-            items: prevTree
+            items: prevTree,
+            currentItemUuid: state.detailsPanel.resourceUuid
         };
     };
 };