Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding new item to an array doesnt show default values when Initial Data is passed #103

Open
nagarajanchinnasamy opened this issue Sep 18, 2017 · 0 comments

Comments

@nagarajanchinnasamy
Copy link
Contributor

nagarajanchinnasamy commented Sep 18, 2017

This issue is different from Issues #63 and #84

When initial data is passed, the form with array items gets loaded properly as per the initial data passed. However, when a new item is added through Add item button, the form elements are not loaded with default data provided in the schema.

This error can be simulated using following schema:

{
  "$schema": "http://json-schema.org/draft-03/schema#",
  "type": "object",
  "properties": {
    "sorts": {
      "type": "array",
      "title": "Sorting",
      "items": {
        "type": "object",
        "properties": {
          "fieldName": {
            "type": "string",
            "title": "Field name"
          },
          "ascending": {
            "type": "boolean",
            "title": "Ascending",
            "default": true
          }
        }
      }
    }
  }
}

Initial data used:

{
  "sorts": [
    {
      "fieldName": "test",
      "ascending": true
    }
  ]
}

Please click here for generated output on Demo:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant