File tree Expand file tree Collapse file tree 4 files changed +7
-6
lines changed Expand file tree Collapse file tree 4 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,8 @@ const TextWidget = ({
3434 const _onFocus = ( {
3535 target : { value } ,
3636 } : React . FocusEvent < HTMLInputElement > ) => onFocus ( id , value ) ;
37-
37+ const inputType = ( type || schema . type ) === 'string' ? 'text' : `${ type || schema . type } `
38+
3839 // const classNames = [rawErrors.length > 0 ? "is-invalid" : "", type === 'file' ? 'custom-file-label': ""]
3940 return (
4041 < Form . Group className = "mb-0" >
@@ -50,7 +51,7 @@ const TextWidget = ({
5051 readOnly = { readonly }
5152 className = { rawErrors . length > 0 ? "is-invalid" : "" }
5253 list = { schema . examples ? `examples_${ id } ` : undefined }
53- type = { type || ( schema . type as string ) }
54+ type = { inputType }
5455 value = { value || value === 0 ? value : "" }
5556 onChange = { _onChange }
5657 onBlur = { _onBlur }
Original file line number Diff line number Diff line change @@ -199,7 +199,7 @@ exports[`array fields fixed array 1`] = `
199199 onFocus = { [Function ]}
200200 readOnly = { false }
201201 required = { true }
202- type = " string "
202+ type = " text "
203203 value = " "
204204 />
205205 </div >
Original file line number Diff line number Diff line change @@ -775,7 +775,7 @@ exports[`single fields string field regular 1`] = `
775775 onChange = { [Function ]}
776776 onFocus = { [Function ]}
777777 readOnly = { false }
778- type = " string "
778+ type = " text "
779779 value = " "
780780 />
781781 </div >
@@ -816,7 +816,7 @@ exports[`single fields string field with placeholder 1`] = `
816816 onChange = { [Function ]}
817817 onFocus = { [Function ]}
818818 readOnly = { false }
819- type = " string "
819+ type = " text "
820820 value = " "
821821 />
822822 </div >
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ exports[`object fields object 1`] = `
4545 onFocus = { [Function ]}
4646 readOnly = { false }
4747 required = { false }
48- type = " string "
48+ type = " text "
4949 value = " "
5050 />
5151 </div >
You can’t perform that action at this time.
0 commit comments