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

Form does not work correctly for schemas containing slashes or dots in property names #1952

Closed
apirogov opened this issue Jun 7, 2022 · 2 comments

Comments

@apirogov
Copy link

apirogov commented Jun 7, 2022

Describe the bug

When having slashes in keys, for each such key the form will have "No applicable renderer found".

Furthermore, when having dots in keys, there is some silent buggy behaviour so that the schema is parsed somehow incorrectly and I cant initialize data.

My current workaround is escaping both slashes and dots to make the form work correctly, and then unescape the keys in the resulting data.

Expected behavior

I expect that any string should be allowed as a key without issues.

The keys we use are Handle PIDs, looking like "21.T11148/dcd4e99d26a00b8132f8"

Steps to reproduce the issue

Initialize this component:

      <JsonForms
        schema= {{
            "$schema": "http://json-schema.org/draft-07/schema",
            "properties": {
              "21.T11148/dcd4e99d26a00b8132f8": {
                  "type": "string"
              }
            }
          }}
        data = {{
            "21.T11148/dcd4e99d26a00b8132f8": "test"
          }}
          renderers={materialRenderers}
          cells={materialCells}
      />

=> wont render

Remove slashes => will render, will not initialize with "test"

Remove dots => will render and initialize correctly

Screenshots

No response

In which browser are you experiencing the issue?

Firefox 99.0

Framework

React

RendererSet

Material

Additional context

No response

@sdirix
Copy link
Member

sdirix commented Jun 8, 2022

Hi @apirogov,

slashes in property names should work with the 3.0 prereleases as we fixed their behavior with #1834. Dots are not yet fixed as it requires more architectural changes. We planned this in for after the 3.0 release. This is tracked with #1849 and this is a draft pr for that #1831

As the reported issues are either already solved or at least already tracked I'll close this issue.

@sdirix sdirix closed this as completed Jun 8, 2022
@apirogov
Copy link
Author

apirogov commented Jun 8, 2022

Great, thanks for the info! Glad to hear that this is known and on the roadmap.

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

No branches or pull requests

2 participants