Add type prop to TextField
authorMichal Klobukowski <michal.klobukowski@contractors.roche.com>
Thu, 27 Dec 2018 09:40:38 +0000 (10:40 +0100)
committerMichal Klobukowski <michal.klobukowski@contractors.roche.com>
Thu, 27 Dec 2018 09:40:38 +0000 (10:40 +0100)
Feature #master

Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski@contractors.roche.com>

src/components/text-field/text-field.tsx

index 0ba9e359748d6376a5e2598b6e366023135e2912..4788e18c51df5824608fdfc8e7793f07a1d2288a 100644 (file)
@@ -27,7 +27,7 @@ type TextFieldProps = WrappedFieldProps & WithStyles<CssRules>;
 
 export const TextField = withStyles(styles)((props: TextFieldProps & {
     label?: string, autoFocus?: boolean, required?: boolean, select?: boolean, disabled?: boolean, children: React.ReactNode, margin?: Margin, placeholder?: string,
-    helperText?: string,
+    helperText?: string, type?: string,
 }) =>
     <MaterialTextField
         helperText={(props.meta.touched && props.meta.error) || props.helperText}
@@ -43,6 +43,7 @@ export const TextField = withStyles(styles)((props: TextFieldProps & {
         children={props.children}
         margin={props.margin}
         placeholder={props.placeholder}
+        type={props.type}
         {...props.input}
     />);