-
Notifications
You must be signed in to change notification settings - Fork 373
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
Unable to add list element #1948
Comments
eneufeld
added a commit
to eneufeld/jsonforms
that referenced
this issue
Jun 20, 2022
The vanilla ArrayControl was wrapping the `addItem` in a function, whereas the `addItem` function is already wrapped. So the `onClick` can directly be bound to `addItem`. Fixes eclipsesource#1948
eneufeld
added a commit
to eneufeld/jsonforms
that referenced
this issue
Jun 20, 2022
The vanilla ArrayControl was wrapping the `addItem` in a function, whereas the `addItem` function is already wrapped. So the `onClick` can directly be bound to `addItem`. The wrong binding lead to the add functionality not working. Increase rank of the ArrayControl so that it behaves the same as for the react material renderers. Add example to demonstrate different selections of renderers based on the existince of a const property in the schema. Fixes eclipsesource#1948
Hi @agonzalezgaliana , |
eneufeld
added a commit
to eneufeld/jsonforms
that referenced
this issue
Jun 20, 2022
The vanilla ArrayControl was wrapping the `addItem` in a function, whereas the `addItem` function is already wrapped. So the `onClick` can directly be bound to `addItem`. The wrong binding lead to the add functionality not working. Increase rank of the ArrayControl so that it behaves the same as for the react material renderers. Add example to demonstrate different selections of renderers based on the existince of a const property in the schema. Fix wrong selection of array layout if type is missing. Fixes eclipsesource#1948
Now I also fixed the wrong renderer selection ;-) . |
sdirix
pushed a commit
that referenced
this issue
Jun 21, 2022
The vanilla ArrayControl was wrapping the `addItem` in a function, whereas the `addItem` function is already wrapped. So the `onClick` can directly be bound to `addItem`. The wrong binding lead to the add functionality not working. Increase rank of the ArrayControl so that it behaves the same as for the react material renderers. Add example to demonstrate different selections of renderers based on the existince of a const property in the schema. Fix wrong selection of array layout if type is missing. Fixes #1948
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
The problem comes from here
Using
@eclipse-emfcloud/theia-tree-editor
and indirectly:Basically, when providing
to JSON forms, it shows a UI with a [+] button (which seems that should allow to add a new element to my list).
Actually, by clicking that button nothing happens:
However, when we only provide
to JSON forms, it shows a completely different UI.
In this UI, the add button actually triggers the corresponding listener in the Tree Editor.
Expected behavior
That by clicking the [+] button the listener methods are called and we can react on user action.
Steps to reproduce the issue
/
Screenshots
No response
In which browser are you experiencing the issue?
Firefox Version 99.0.1
Framework
Core, React
RendererSet
Vanilla
Additional context
The relevant schema snippet is the following:
The data looks like the following:
The text was updated successfully, but these errors were encountered: