Skip to content

Commit

Permalink
fix: json schema array items (#7007)
Browse files Browse the repository at this point in the history
* feat(ux): json schema array now states type to add

this is to enhance nested array usability wise
  • Loading branch information
mathis-m authored Mar 3, 2021
1 parent 68bd61a commit 2016c18
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/json-schema-components.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -264,7 +264,7 @@ export class JsonSchema_array extends PureComponent {
title={arrayErrors.length ? arrayErrors : ""}
onClick={this.addItem}
>
Add item
Add {schemaItemsType ? `${schemaItemsType} ` : ""}item
</Button>
) : null}
</div>
Expand Down

0 comments on commit 2016c18

Please sign in to comment.