fix: json schema array items (#7007)
* feat(ux): json schema array now states type to add this is to enhance nested array usability wise
This commit is contained in:
@@ -181,7 +181,7 @@ export class JsonSchema_array extends PureComponent {
|
|||||||
const schemaItemsEnum = schema.getIn(["items", "enum"])
|
const schemaItemsEnum = schema.getIn(["items", "enum"])
|
||||||
const schemaItemsType = schema.getIn(["items", "type"])
|
const schemaItemsType = schema.getIn(["items", "type"])
|
||||||
const schemaItemsFormat = schema.getIn(["items", "format"])
|
const schemaItemsFormat = schema.getIn(["items", "format"])
|
||||||
const schemaItemsSchema = schema.getIn(["items", "schema"])
|
const schemaItemsSchema = schema.get("items")
|
||||||
let ArrayItemsComponent
|
let ArrayItemsComponent
|
||||||
let isArrayItemText = false
|
let isArrayItemText = false
|
||||||
let isArrayItemFile = (schemaItemsType === "file" || (schemaItemsType === "string" && schemaItemsFormat === "binary")) ? true : 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 : ""}
|
title={arrayErrors.length ? arrayErrors : ""}
|
||||||
onClick={this.addItem}
|
onClick={this.addItem}
|
||||||
>
|
>
|
||||||
Add item
|
Add {schemaItemsType ? `${schemaItemsType} ` : ""}item
|
||||||
</Button>
|
</Button>
|
||||||
) : null}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user