File tree Expand file tree Collapse file tree 4 files changed +8
-7
lines changed Expand file tree Collapse file tree 4 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ const TextWidget = ({
4444 uiSchema 
4545 /* TODO: , rootSchema */ 
4646 ) ; 
47+  const  inputType  =  ( type  ||  schema . type )  ===  'string'  ? 'text'  : `${ type  ||  schema . type }  
4748
4849 return  ( 
4950 < TextField 
@@ -52,7 +53,7 @@ const TextWidget = ({
5253 autoFocus = { autofocus } 
5354 required = { required } 
5455 disabled = { disabled  ||  readonly } 
55-  type = { type   ||   ( schema . type   as  string ) } 
56+  type = { inputType   as  string } 
5657 value = { value  ||  value  ===  0  ? value  : "" } 
5758 error = { rawErrors . length  >  0 } 
5859 onChange = { _onChange } 
Original file line number Diff line number Diff line change @@ -295,7 +295,7 @@ exports[`array fields fixed array 1`] = `
295295 onFocus = { [Function ]}  
296296 placeholder = " "  
297297 required = { true }  
298-  type = " string "  
298+  type = " text "  
299299 value = " "  
300300 /> 
301301 </div > 
Original file line number Diff line number Diff line change @@ -870,7 +870,7 @@ exports[`single fields hidden label 1`] = `
870870 onFocus = { [Function ]}  
871871 placeholder = " "  
872872 required = { false }  
873-  type = " string "  
873+  type = " text "  
874874 value = " "  
875875 /> 
876876 </div > 
@@ -1861,7 +1861,7 @@ exports[`single fields string field regular 1`] = `
18611861 onFocus = { [Function ]}  
18621862 placeholder = " "  
18631863 required = { false }  
1864-  type = " string "  
1864+  type = " text "  
18651865 value = " "  
18661866 /> 
18671867 </div > 
@@ -1972,7 +1972,7 @@ exports[`single fields string field with placeholder 1`] = `
19721972 onFocus = { [Function ]}  
19731973 placeholder = " placeholder"  
19741974 required = { false }  
1975-  type = " string "  
1975+  type = " text "  
19761976 value = " "  
19771977 /> 
19781978 </div > 
Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ exports[`object fields additionalProperties 1`] = `
137137 onFocus = { [Function ]}  
138138 placeholder = " "  
139139 required = { false }  
140-  type = " string "  
140+  type = " text "  
141141 value = " foo"  
142142 /> 
143143 </div > 
@@ -381,7 +381,7 @@ exports[`object fields object 1`] = `
381381 onFocus = { [Function ]}  
382382 placeholder = " "  
383383 required = { false }  
384-  type = " string "  
384+  type = " text "  
385385 value = " "  
386386 /> 
387387 </div > 
                         You can’t perform that action at this time. 
           
                  
0 commit comments