From 2016c184b63d1cc1c5bba33df58deff500ef204c Mon Sep 17 00:00:00 2001 From: Mahtis Michel Date: Wed, 3 Mar 2021 22:44:57 +0100 Subject: [PATCH] fix: json schema array items (#7007) * feat(ux): json schema array now states type to add this is to enhance nested array usability wise --- src/core/json-schema-components.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/json-schema-components.jsx b/src/core/json-schema-components.jsx index 47a19810..8700d5c6 100644 --- a/src/core/json-schema-components.jsx +++ b/src/core/json-schema-components.jsx @@ -181,7 +181,7 @@ export class JsonSchema_array extends PureComponent { const schemaItemsEnum = schema.getIn(["items", "enum"]) const schemaItemsType = schema.getIn(["items", "type"]) const schemaItemsFormat = schema.getIn(["items", "format"]) - const schemaItemsSchema = schema.getIn(["items", "schema"]) + const schemaItemsSchema = schema.get("items") let ArrayItemsComponent let isArrayItemText = false let isArrayItemFile = (schemaItemsType === "file" || (schemaItemsType === "string" && schemaItemsFormat === "binary")) ? true : false @@ -264,7 +264,7 @@ export class JsonSchema_array extends PureComponent { title={arrayErrors.length ? arrayErrors : ""} onClick={this.addItem} > - Add item + Add {schemaItemsType ? `${schemaItemsType} ` : ""}item ) : null}