jsonforms
jsonforms copied to clipboard
Cannot enter values in field with brackets in property name
Describe the bug
When you add a property with brackets in the property name ("test[0]") in your schema and UI schema, you can't type or enter any value in the corresponding input field.
However, when you pass some value for this field as data, you can type a value in the input field if it's a simple field (not an object with it's own properties).
Expected behavior
I can enter a value in an input field for a property that has brackets in its name.
Steps to reproduce the issue
- Clone the jsonforms angular seed from https://github.com/eclipsesource/jsonforms-angular-seed
- Replace contents of "src\assets\schema.json" with
{
"type": "object",
"properties": {
"test[0]": { "type": "string" },
"object[0]": {
"type": "object",
"properties": {
"test": { "type": "string" }
}
}
}
}
- Replace contents of "src\assets\uischema.json" with
{
"type": "VerticalLayout",
"elements": [
{
"type": "Control",
"scope": "#/properties/test[0]"
},
{
"type": "Control",
"scope": "#/properties/object[0]"
}
]
}
- Run the jsonforms angular seed
- Go to localhost:4200
- Try to type something in the field "Test 0", this does not work
- Try to type something in the field "Object 0 Test", this does not work
- Replace the contents of "src\app\data.ts" with
export default {
"test[0]": "TEST",
"object[0]": {
"test": "TEST"
}
};
- Go to localhost:4200
- The field "Test 0" will now contain the value "TEST" and you can now change this value
- The field "Object 0 Test" will now contain the value "TEST" and you can NOT change this value
Screenshots
No response
In which browser are you experiencing the issue?
Google Chrome 110.0.5481.178
Which Version of JSON Forms are you using?
v3.0.0
Framework
Angular
RendererSet
Material
Additional context
No response
Thanks for the report!
Hey @sdirix checking on this issue isn't this supposed to be fixed with Custom renderer? Since your'e trying to access data at 0th index here test[0] cant we just integrate custom renderer and then have this working by updating the props value?