File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -47,13 +47,14 @@ function FormField(props) {
4747 if ( props . schema . handler )
4848 inputProps . handler = props . schema . handler ;
4949
50+ let schemaType = normalizeKeyword ( props . schema . type ) ;
5051 let type ;
5152
5253 if ( props . schema . hasOwnProperty ( 'const' ) ) {
5354 type = actualType ( props . schema . const ) ;
5455 inputProps . readOnly = true ;
5556 } else {
56- type = normalizeKeyword ( props . schema . type ) ;
57+ type = schemaType ;
5758 }
5859
5960 let choices = getKeyword ( props . schema , 'choices' , 'enum' ) ;
@@ -113,14 +114,16 @@ function FormField(props) {
113114 break ;
114115 case 'range' :
115116 case 'integer' :
116- inputProps . step = '1' ;
117- // fall through
118117 case 'number' :
119118 if ( type === 'range' )
120119 inputProps . type = 'range' ;
121120 else
122121 inputProps . type = 'number' ;
123- inputProps . step = 'any'
122+
123+ if ( schemaType === 'integer' )
124+ inputProps . step = '1' ;
125+ else
126+ inputProps . step = 'any' ;
124127
125128 InputField = FormInput ;
126129
You can’t perform that action at this time.
0 commit comments