X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/9fed03a84c6ef5234d61f7d62c93f7629da2409d..71b9264c1720e619f8cfcb297a7848ece420c61c:/src/components/file-tree/file-tree.tsx

diff --git a/src/components/file-tree/file-tree.tsx b/src/components/file-tree/file-tree.tsx
index 06fc8b7855..4f581a6cf8 100644
--- a/src/components/file-tree/file-tree.tsx
+++ b/src/components/file-tree/file-tree.tsx
@@ -12,6 +12,7 @@ export interface FileTreeProps {
     onMenuOpen: (event: React.MouseEvent<HTMLElement>, item: TreeItem<FileTreeData>) => void;
     onSelectionToggle: (event: React.MouseEvent<HTMLElement>, item: TreeItem<FileTreeData>) => void;
     onCollapseToggle: (id: string, status: TreeItemStatus) => void;
+    onFileClick: (id: string) => void;
 }
 
 export class FileTree extends React.Component<FileTreeProps> {
@@ -24,7 +25,7 @@ export class FileTree extends React.Component<FileTreeProps> {
             onContextMenu={this.handleContextMenu}
             toggleItemActive={this.handleToggleActive}
             toggleItemOpen={this.handleToggle}
-            onSelectionChange={this.handleSelectionChange} />;
+            toggleItemSelection={this.handleSelectionChange} />;
     }
 
     handleContextMenu = (event: React.MouseEvent<any>, item: TreeItem<FileTreeData>) => {
@@ -32,11 +33,13 @@ export class FileTree extends React.Component<FileTreeProps> {
         this.props.onMenuOpen(event, item);
     }
 
-    handleToggle = (id: string, status: TreeItemStatus) => {
+    handleToggle = (event: React.MouseEvent<{}>, { id, status }: TreeItem<{}>) => {
         this.props.onCollapseToggle(id, status);
     }
 
-    handleToggleActive = () => { return; };
+    handleToggleActive = (_: React.MouseEvent<HTMLElement>, item: TreeItem<FileTreeData>) => {
+        this.props.onFileClick(item.id);
+    }
 
     handleSelectionChange = (event: React.MouseEvent<HTMLElement>, item: TreeItem<FileTreeData>) => {
         event.stopPropagation();
