X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/9c15617f293ab41ea8b8e2962ecd1d109b80a026..8df09b8ee52974e5bcd5fea862c3639f54afb54b:/src/views/run-process-panel/inputs/generic-input.tsx

diff --git a/src/views/run-process-panel/inputs/generic-input.tsx b/src/views/run-process-panel/inputs/generic-input.tsx
index 8eb1ca3e..066bf2b8 100644
--- a/src/views/run-process-panel/inputs/generic-input.tsx
+++ b/src/views/run-process-panel/inputs/generic-input.tsx
@@ -4,8 +4,8 @@
 
 import * as React from 'react';
 import { WrappedFieldProps } from 'redux-form';
-import { FormGroup, FormLabel, Input, FormHelperText } from '@material-ui/core';
-import { GenericCommandInputParameter, getInputLabel } from '../../../models/workflow';
+import { FormGroup, FormLabel, FormHelperText } from '@material-ui/core';
+import { GenericCommandInputParameter, getInputLabel, isRequiredInput } from '~/models/workflow';
 
 export type GenericInputProps = WrappedFieldProps & {
     commandInput: GenericCommandInputParameter<any, any>;
@@ -16,9 +16,14 @@ type GenericInputContainerProps = GenericInputProps & {
 };
 export const GenericInput = ({ component: Component, ...props }: GenericInputContainerProps) => {
     return <FormGroup>
-        <FormLabel error={props.meta.touched && props.meta.error}>{getInputLabel(props.commandInput)}</FormLabel>
+        <FormLabel
+            focused={props.meta.active}
+            required={isRequiredInput(props.commandInput)}
+            error={props.meta.touched && !!props.meta.error}>
+            {getInputLabel(props.commandInput)}
+        </FormLabel>
         <Component {...props} />
-        <FormHelperText error={props.meta.touched && props.meta.error}>
+        <FormHelperText error={props.meta.touched && !!props.meta.error}>
             {
                 props.meta.touched && props.meta.error
                     ? props.meta.error
