Skip to content

Commit

Permalink
Fixed number fields rendering text inputs.
Browse files Browse the repository at this point in the history
  • Loading branch information
snarlynarwhal authored and tchapi committed Sep 17, 2018
1 parent ba211ad commit b43b465
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/jsonform.js
Original file line number Diff line number Diff line change
Expand Up @@ -3174,9 +3174,11 @@ formTree.prototype.buildFromLayout = function (formElement, context) {
(schemaElement.format === 'color')) {
formElement.type = 'color';
} else if ((schemaElement.type === 'number' ||
schemaElement.type === 'integer' ||
schemaElement.type === 'string' ||
schemaElement.type === 'any') &&
schemaElement.type === 'integer') &&
!schemaElement['enum']) {
formElement.type = 'number';
} else if ((schemaElement.type === 'string' ||
schemaElement.type === 'any') &&
!schemaElement['enum']) {
formElement.type = 'text';
} else if (schemaElement.type === 'boolean') {
Expand Down

0 comments on commit b43b465

Please sign in to comment.