-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
Missing namespace when addying key #60
Comments
@jorges119 You might need to provide more information and examples to make it easier for me to help you. |
With and object such as:
The handler when adding a new key inside a1 level (sibling to b1) contains the following parameters:
With this information is impossible to update the parent object because we don't know where the object in the handler sits in relation with root. The solution should be straight forward by providing the opt parameter with the namespace as it is done in the onDelete handler. I wanted to create a PR targeting v1 but I see the branch origin/v1 contains the v2 development, is there any v1 release branch that I am missing or are v1 fixes not supported? If I understood correctly v2 does not yet support edition, right? |
@jorges119 You can submit a PR for v1 now. v1 and v2 are completely separated, and the main branch contains the latest v2 version code. |
How come it's not supported, it is correct. When adding a value to a nested object, you're not able to see the namespace, thats completely weird, as such behaviour only provides mutable abilities to edit the json provided to the json editor. If you're trying to work with two way data binding, onAdd won't support it for nested objects. |
When adding a new property we get the old and new object but no reference to where that node belongs within the whole object.
Returning the opts parameter like in onDelete would be sufficient as it includes the namespace.
Currently using 1.12.2, so this would be helpful towards version 2 implementation.
The text was updated successfully, but these errors were encountered: