Merge branch 'origin/master' into 14478-log-in-into-clusters
[arvados-workbench2.git] / src / components / text-field / text-field.tsx
index 0ebb46bcaae5ff389f1b705c7214f3ef68aaa5fe..93c4080f0fead0c7330f0a65a6824bdb628da8e1 100644 (file)
@@ -26,13 +26,13 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
 type TextFieldProps = WrappedFieldProps & WithStyles<CssRules>;
 
 export const TextField = withStyles(styles)((props: TextFieldProps & {
-    label?: string, autoFocus?: boolean, required?: boolean, select?: boolean, children: React.ReactNode, margin?: Margin, placeholder?: string
+    label?: string, autoFocus?: boolean, required?: boolean, select?: boolean, disabled?: boolean, children: React.ReactNode, margin?: Margin, placeholder?: string
 }) =>
     <MaterialTextField
         helperText={props.meta.touched && props.meta.error}
         className={props.classes.textField}
         label={props.label}
-        disabled={props.meta.submitting}
+        disabled={props.disabled || props.meta.submitting}
         error={props.meta.touched && !!props.meta.error}
         autoComplete='off'
         autoFocus={props.autoFocus}