Description
Describe the bug
As you know there is a path
prop that is passed to the renderer that indicates the location of data
(that should be rendered by that renderer) in the root data
object (e.g. 'foo.bar'
).
It's a dot-separated string:
jsonforms/packages/core/src/util/path.ts
Lines 82 to 90 in 81f1f19
compose(path, segments.join('.'))
Is this safe? Then 'foo.bar'
points to data.foo.bar
or data['foo.bar']
?
Expected behavior
The library should can distinguish between these paths. For example, using arrays (instead of strings):
path1 = ['foo', 'bar']
path2 = ['foo.bar']
Steps to reproduce the issue
-
Go to Playground
-
Set:
JSON-Schema
:{ "type": "object", "properties": { "my.name": { "type": "string" } } }
UI-Schema
:false
Data
:{ "my.name": "S. Mahdi", "my": { "name": "MirIsmaili" } }
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 edit data.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