Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Inserting iteration before causes "illegal state when comparing controls" #4035
referenced this issue
Apr 24, 2019
The cause must be that in the first iteration, a section component is collapsed and some content is missing the control tree, as excepted. Then, comparing with the new first iteration, the number of children is different, causing the failure of the assertion.
We go from 1 to 3 children of section
In this case, there is not a structural change. We are comparing unrelated iterations. So we need to trigger full updates here as well.
The lowdown is that when comparing repeats, and when iterations are moved, there is a chance that the two sides we are comparing for a given iteration position contain components with lazy bindings whose content is not compatible. If the components have changed structurally, we catch that and produce a full update. But the components might not have changed structurally when iterations move. So we must catch that case too.
How do we detect this? One possibility is that the number of their children has changed, and that is a valid case, but it is not the only one. If