Skip to content

Commit 07d272e

Browse files
committed
Bump version to 2.8.4 and update dist files
1 parent 0ef80b5 commit 07d272e

File tree

5 files changed

+11
-5
lines changed

5 files changed

+11
-5
lines changed

dist/react-json-form.cjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ function debounce(func, wait) {
149149
}
150150
function normalizeKeyword(kw) {
151151
/* Converts custom supported keywords to standard JSON schema keywords */
152+
if (Array.isArray(kw)) kw = kw[0];
153+
152154
switch (kw) {
153155
case 'list':
154156
return 'array';
@@ -2381,7 +2383,7 @@ function FormField(props) {
23812383
if (typeof inputProps.error === 'string') inputProps.error = [inputProps.error];
23822384
if (props.schema.placeholder) inputProps.placeholder = props.schema.placeholder;
23832385
if (props.schema.handler) inputProps.handler = props.schema.handler;
2384-
let type = props.schema.type;
2386+
let type = normalizeKeyword(props.schema.type);
23852387
let choices = getKeyword(props.schema, 'choices', 'enum');
23862388

23872389
if (choices) {

dist/react-json-form.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/react-json-form.modern.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ function debounce(func, wait) {
143143
}
144144
function normalizeKeyword(kw) {
145145
/* Converts custom supported keywords to standard JSON schema keywords */
146+
if (Array.isArray(kw)) kw = kw[0];
147+
146148
switch (kw) {
147149
case 'list':
148150
return 'array';
@@ -2375,7 +2377,7 @@ function FormField(props) {
23752377
if (typeof inputProps.error === 'string') inputProps.error = [inputProps.error];
23762378
if (props.schema.placeholder) inputProps.placeholder = props.schema.placeholder;
23772379
if (props.schema.handler) inputProps.handler = props.schema.handler;
2378-
let type = props.schema.type;
2380+
let type = normalizeKeyword(props.schema.type);
23792381
let choices = getKeyword(props.schema, 'choices', 'enum');
23802382

23812383
if (choices) {

dist/react-json-form.module.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ function debounce(func, wait) {
143143
}
144144
function normalizeKeyword(kw) {
145145
/* Converts custom supported keywords to standard JSON schema keywords */
146+
if (Array.isArray(kw)) kw = kw[0];
147+
146148
switch (kw) {
147149
case 'list':
148150
return 'array';
@@ -2375,7 +2377,7 @@ function FormField(props) {
23752377
if (typeof inputProps.error === 'string') inputProps.error = [inputProps.error];
23762378
if (props.schema.placeholder) inputProps.placeholder = props.schema.placeholder;
23772379
if (props.schema.handler) inputProps.handler = props.schema.handler;
2378-
let type = props.schema.type;
2380+
let type = normalizeKeyword(props.schema.type);
23792381
let choices = getKeyword(props.schema, 'choices', 'enum');
23802382

23812383
if (choices) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@bhch/react-json-form",
3-
"version": "2.8.3",
3+
"version": "2.8.4",
44
"description": "Create forms using JSON Schema",
55
"publishConfig": {
66
"access": "public"

0 commit comments

Comments
 (0)