-
Notifications
You must be signed in to change notification settings - Fork 379
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
Is "dot-separated" path safe? #1849
Comments
Hi @mirismaili, thanks for the report. The issue is already reported and we're already working on a fix, see #1831. However the change is non trivial as using an array as a prop triggers rerenders by default in all bindings. Therefore we want to make sure that we don't introduce any regressions. |
Hi @sdirix, OK. So I develop new features that I'm working on (additionalProperties and patternProperties), with this issue until this be resolved. |
… `string`) for react (in these packages: "core", "react" and "material-renderers") eclipsesource#1849 eclipsesource#1831
… `string`) for react (in these packages: "core", "react" and "material-renderers") eclipsesource#1849 eclipsesource#1831
… `string`) for react (in these packages: "core", "react" and "material-renderers") eclipsesource#1849 eclipsesource#1831
… `string`) for react (in these packages: "core", "react" and "material-renderers") eclipsesource#1849 eclipsesource#1831
… `string`) for react (in these packages: "core", "react" and "material-renderers") eclipsesource#1849 eclipsesource#1831
… `string`) for react (in these packages: "core", "react" and "material-renderers") eclipsesource#1849 eclipsesource#1831
… `string`) for react (in these packages: "core", "react" and "material-renderers") eclipsesource#1849 eclipsesource#1831
We settled on an improvement, documented it in #2153 and will start developing it soon. Therefore I'll close this issue as the follow up already exists. |
Describe the bug
As you know there is a
path
prop that is passed to the renderer that indicates the location ofdata
(that should be rendered by that renderer) in the rootdata
object (e.g.'foo.bar'
).It's a dot-separated string:
jsonforms/packages/core/src/util/path.ts
Lines 82 to 90 in 81f1f19
Is this safe? Then
'foo.bar'
points todata.foo.bar
ordata['foo.bar']
?Expected behavior
The library should can distinguish between these paths. For example, using arrays (instead of strings):
Steps to reproduce the issue
Go to Playground
Set:
JSON-Schema
:UI-Schema
:false
Data
:As you can see in the playground, the synchronization process flows along with the green arrows (see below screenshot), but NOT along with the red arrows. (When you edit the form,
data['my.name']
will be updated (only) and when you editdata.my.name
in the editor (only), the form will be updated).Screenshots
In which browser are you experiencing the issue?
Google Chrome v96.0.4664.93 (Official Build) (64-bit)
Framework
No response
RendererSet
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: