Skip to content

Remove json-forms key in form-component (currently a workaround!) #182

@flx-sta

Description

@flx-sta

ℹ️ [Has been added as a workaround for #181 ]

Describe the bug

Currently json-forms/vue2 has a bug (eclipsesource/jsonforms#1726) that the renderers are not reacting in the right way to active changes to schema or uischema.

Also the sha256.js file has been added to ensure that the key-string is kept short.
This lib can portentially be removed then too.

Until this is fixed we will have to keep this workaround but as soon as the issue is resolved we should upgrade and remove this workaround

To Reproduce

Steps to reproduce the behavior:

  1. Create a tenant
  2. Go on any page (e.g. Home)
  3. Insert a form component and select it
  4. Insert a valid schema into the schema textarea
    • e.g.
      {
        "type": "object",
        "properties": {
          "foo": {
            "type": "string"
          }
        }
      }
  5. Insert a valid uischema into the uischema textarea
    • e.g.
    {
      "type": "VerticalLayout",
      "elements": [
        {
          "type": "Control",
          "scope": "#/properties/foo"
        }
      ]
    }
  6. Add an additional property to the schema
    • e.g.
      {
        "type": "object",
        "properties": {
          "foo": {
            "type": "string"
          },
         "bar": { "type": "string"}
        }
      }
  7. Extend the uischema to render the new property
    • e.g.
    {
      "type": "VerticalLayout",
      "elements": [
        {
          "type": "Control",
          "scope": "#/properties/foo"
        },
        { "type": "Control", "scope": "#/properties/bar" }
      ]
    }
  8. You will now see:
    • image

Expected behavior

It should render the new prop properly without having to use :key

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingwontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions