Skip to content

Nested arrays button does not render nicely, and has no delete button #1124

Closed
@chrisjohnson

Description

@chrisjohnson

Describe the bug

Using a schema like this:

{"$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items":
  {"type": "object",
    "required": ["message"],
    "properties": {
      "message": {"type": "string"},
      "reject_codes": {"type": "array", "items": {"type": "string", "minLength": 1}}
    }
  }
}

The rendered interface is poor

To Reproduce
Steps to reproduce the behavior:

  1. Clone the seed demo app
  2. Set the schema as specified above
  3. Set uischema and data to undefined

Expected behavior
The button should be styled to match the rest of the form, and there should be a button to remove elements from the array

Screenshots
image

Browser (please complete the following information):

  • Chrome Version 69.0.3497.100 (Official Build) (64-bit)

Used Setup (please complete the following information):

  • Framework: react
  • RendererSet: material

Additional context
This appears to be exactly as it was screenshotted when the code to implement nested arrays was introduced: #994

So I'm not sure if this was just a temporary fix for a bug, or the intended behavior long-term, or what. I dug around in the code but I'm not very familiar with this codebase so it was hard for me to see why the standard array layout renderer wouldn't be used here

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions