X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/c11055f2d6ce8385088bc221eab1175e31777ec0..75db1e88374315f84fdfb30faee84253e1383a28:/src/views-components/collection-panel-files/collection-panel-files.ts diff --git a/src/views-components/collection-panel-files/collection-panel-files.ts b/src/views-components/collection-panel-files/collection-panel-files.ts index ae9b53e330..3e99e10a70 100644 --- a/src/views-components/collection-panel-files/collection-panel-files.ts +++ b/src/views-components/collection-panel-files/collection-panel-files.ts @@ -12,8 +12,9 @@ import { Dispatch } from "redux"; import { collectionPanelFilesAction } from "~/store/collection-panel/collection-panel-files/collection-panel-files-actions"; import { contextMenuActions } from "~/store/context-menu/context-menu-actions"; import { ContextMenuKind } from "../context-menu/context-menu"; -import { Tree, getNodeChildren, getNode } from "~/models/tree"; +import { Tree, getNodeChildrenIds, getNode } from "~/models/tree"; import { CollectionFileType } from "~/models/collection-file"; +import { openUploadCollectionFilesDialog } from '~/store/collections/uploader/collection-uploader-actions'; const memoizedMapStateToProps = () => { let prevState: CollectionPanelFilesState; @@ -22,7 +23,7 @@ const memoizedMapStateToProps = () => { return (state: RootState): Pick => { if (prevState !== state.collectionPanelFiles) { prevState = state.collectionPanelFiles; - prevTree = getNodeChildren('')(state.collectionPanelFiles) + prevTree = getNodeChildrenIds('')(state.collectionPanelFiles) .map(collectionItemToTreeItem(state.collectionPanelFiles)); } return { @@ -32,7 +33,9 @@ const memoizedMapStateToProps = () => { }; const mapDispatchToProps = (dispatch: Dispatch): Pick => ({ - onUploadDataClick: () => { return; }, + onUploadDataClick: () => { + dispatch(openUploadCollectionFilesDialog()); + }, onCollapseToggle: (id) => { dispatch(collectionPanelFilesAction.TOGGLE_COLLECTION_FILE_COLLAPSE({ id })); }, @@ -77,7 +80,7 @@ const collectionItemToTreeItem = (tree: Tree