-
Notifications
You must be signed in to change notification settings - Fork 652
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
Problems with model binding when using nested Arrays #590
Comments
@elbunuelo I've just started to manage the project and would like to thank you for providing a solution in the issue you have raised, it seems to be working for a lot of people, I will see about getting it in the next update. |
Well, this makes me really happy. If it's all right, I'd like to submit a pull request for the fix |
By all means :) |
finally i will be able to remove the manually override from the plugin xD |
A PR has been merged for the issue, please test the solution is resolved and re-open if it is not. |
I'm currently using schema form version 0.8.12 with schema form bootstrap version 0.2.0 and I'm trying to use two nested arrays, however the second level array field values end up appearing as [Object object].
I traced back the error to the
keyRedaction
state attribute inside thearray
builder (https://github.com/Textalk/angular-schema-form/blob/0.8.12/src/services/builder.js#L136).From my point of view, the problem is that the keyRedaction from the parent array is carried over to the child array, which causes the
key
to be an empty array inside thengModel
builder (https://github.com/Textalk/angular-schema-form/blob/0.8.12/src/services/builder.js#L31).By changing line 136 inside builder.js from
state.keyRedaction = state.keyRedaction || 0;
tostate.keyRedaction = 0;
(i.e. resetting the keyRedaction with each nested array), I was able to get it to work properly, but I'm not sure what other repercussions can that change have in the rest of the code.What do you think about it?
The text was updated successfully, but these errors were encountered: