-
Notifications
You must be signed in to change notification settings - Fork 102
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
Breaking interaction between dynamic lists and tables #1064
Comments
The issue as far as I understand it: There is some faulty interaction somewhere between the table's data initialization and the dynamic list leading to an element of the array to be dropped (element 0 becomes empty). This messes with the chunking logic for the table as we use reduce, which ends up starting at index 1, leading to an error. Soft fix would be to filter the array of empty elements in the chunking logic. |
Actually a separate issue. Although the above issue was interfering with the fixing of this one. RCAConditional hiding logic on dynamic list group causes deletion of the array element in the working state, the thing is the way the array element is deleted is not via removing the element from the array, but rather by setting it to an empty element, so we end up with arrays of the form The chunking logic of the table makes use of reduce, as previously mentioned, but because the empty element is present, the indexes used in reduce are offset, which breaks the reduction logic. So I'm not sure what the fix here is, the way I see it either we make sure that we don't create these empty elements, but I believe this will cause issues with the rendering of the dynamic list. Another option that may keep the hierarchy intact would be to create null values, but then we will need to filter those out on submit. The simplest fix would be to filter out empty elements from the table data source. I'll try this out. |
Fixed via #1088 |
Describe the Bug
This form apparently breaks form-js
Steps to Reproduce
Expected Behavior
The text was updated successfully, but these errors were encountered: