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

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

Open
flx-sta opened this issue Mar 26, 2021 · 0 comments
Open

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

flx-sta opened this issue Mar 26, 2021 · 0 comments
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@flx-sta
Copy link
Collaborator

flx-sta commented Mar 26, 2021

ℹ️ [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

@flx-sta flx-sta added bug Something isn't working wontfix This will not be worked on labels Mar 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant