@@ -3,7 +3,7 @@ import {getBlankData, findMatchingSubschemaIndex, dataObjectMatchesSchema,
33 dataArrayMatchesSchema } from './data' ;
44import { Button , FormInput , FormCheckInput , FormRadioInput , FormSelectInput ,
55 FormFileInput , FormRow , FormGroup , GroupTitle , GroupDescription , FormRowControls , FormTextareaInput ,
6- FormDateTimeInput , FormMultiSelectInput , FileUploader , AutoCompleteInput } from './components' ;
6+ FormDateTimeInput , FormMultiSelectInput , FileUploader , AutoCompleteInput , FormURLInput } from './components' ;
77import { getVerboseName , convertType , getCoordsFromName , getKeyword , normalizeKeyword ,
88 joinCoords , splitCoords , actualType , getSchemaType , isEqualset , isSubset } from './util' ;
99
@@ -81,14 +81,18 @@ function FormField(props) {
8181 InputField = FormInput ;
8282
8383 if ( props . schema . format ) {
84- if ( props . schema . format === 'data-url' ) {
84+ let format = props . schema . format ;
85+
86+ if ( format === 'data-url' ) {
8587 InputField = FormFileInput ;
86- } else if ( props . schema . format === 'file-url' ) {
88+ } else if ( format === 'file-url' ) {
8789 InputField = FileUploader ;
88- } else if ( normalizeKeyword ( props . schema . format ) === 'date-time' ) {
90+ } else if ( normalizeKeyword ( format ) === 'date-time' ) {
8991 InputField = FormDateTimeInput ;
92+ } else if ( format === 'uri' || format === 'uri-reference' ) {
93+ InputField = FormURLInput ;
9094 }
91- inputProps . type = props . schema . format ;
95+ inputProps . type = format ;
9296 } else if ( props . schema . widget === 'hidden' ) {
9397 inputProps . type = 'hidden' ;
9498 } else {
0 commit comments