X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/50939103cce489919423adcf8292d2f960a180fb..42db83a0075f9704dcbfb2cd29821c97ff0fe34b:/src/views/run-process-panel/inputs/file-input.tsx diff --git a/src/views/run-process-panel/inputs/file-input.tsx b/src/views/run-process-panel/inputs/file-input.tsx index 468a9c81..7e0925e8 100644 --- a/src/views/run-process-panel/inputs/file-input.tsx +++ b/src/views/run-process-panel/inputs/file-input.tsx @@ -10,7 +10,7 @@ import { CWLType } from '~/models/workflow'; import { Field } from 'redux-form'; -import { require } from '~/validators/require'; +import { ERROR_MESSAGE } from '~/validators/require'; import { Input, Dialog, DialogTitle, DialogContent, DialogActions, Button } from '@material-ui/core'; import { GenericInputProps, GenericInput } from './generic-input'; import { ProjectsTreePicker } from '~/views-components/projects-tree-picker/projects-tree-picker'; @@ -19,7 +19,6 @@ import { initProjectsTreePicker } from '~/store/tree-picker/tree-picker-actions' import { TreeItem } from '~/components/tree/tree'; import { ProjectsTreePickerItem } from '~/views-components/projects-tree-picker/generic-projects-tree-picker'; import { CollectionFile, CollectionFileType } from '~/models/collection-file'; -import { getFileFullPath } from '~/services/collection-service/collection-service-files-response'; export interface FileInputProps { input: FileCommandInputParameter; @@ -37,7 +36,7 @@ export const FileInput = ({ input }: FileInputProps) => })} validate={[ isRequiredInput(input) - ? require + ? (file?: File) => file ? undefined : ERROR_MESSAGE : () => undefined, ]} />; @@ -92,10 +91,11 @@ const FileInputComponent = connect()( } + onClick={!props.commandInput.disabled ? this.openDialog : undefined} + onKeyPress={!props.commandInput.disabled ? this.openDialog : undefined} />} {...this.props} />; }