VulcanJS / Vulcan

🌋 A toolkit to quickly build apps with React, GraphQL & Meteor
http://vulcanjs.org
MIT License
7.98k stars 1.88k forks source link

SmartForm cannot update nested input fields #2575

Closed kevinashworth closed 4 years ago

kevinashworth commented 4 years ago

Addressed by PR #2574 -- this one change to my two-repo install restores my ability to edit nested form fields

kevinashworth commented 4 years ago

Some Form changes from a week ago, just before version 1.15.0, are causing a significant error — cannot create or update nested inputs. Nothing happens when I type in these inputs.

I’ve gone backwards in the commit history, and this commit introduces the problem: https://github.com/VulcanJS/Vulcan/commit/594bf423bc86aa83061b53866f6fcefa6415be03

I hope I have this right: document — what gets used with this commit — does not contain the updated values. But what was used previously, currentDocument (i.e. the SmartForm’s this.state.currentDocument), does have the necessary values.

In Vulcan-Starter, I see the same thing in example-forms: at the problematic commit, updating of address inputs does not work, but at the commit before, it does. (I removed blackboxNestedArray to get this form to submit.)

In both my app and example-forms, I can update addresses only up to this commit: https://github.com/VulcanJS/Vulcan/commit/4a216826b1a1876662e0d3c89e20250c55bf5707

eric-burel commented 4 years ago

Does the merged PR fixes it for you now in devel?

kevinashworth commented 4 years ago

Yes, it's working for me now with the devel branch where it stands now (commit 16e06e5888088f660d7726db6d042e4bafcb84c1). I can edit all the fields.

eric-burel commented 4 years ago

Thanks a lot then for finding the issue and solving it!