A bit of an edge case, but it is obviously supposed to work.
We move an event from one column into a column to the right.
Columns have their own child arrays.
We also add a new CSS class.
idea:
We check the old tree, if the node exists there. If so, we move the real dom of the node to the new spot.
Now this is the part, which is a bit hack-ish (feels smart though).
While we can not touch the new vnode (would just break the state completely),
we actually put the node into the new spot, just inside the old tree.
This way, the delta comparisons of the old and new node will happen out of the box.
It is an expensive search task, but reduces the work once the engine arrives at the modified child array:
We do not get additional index changes, since the arrays are in sync.
The change did not break any other test cases, but needs some testing.
A bit of an edge case, but it is obviously supposed to work.
We move an event from one column into a column to the right. Columns have their own child arrays. We also add a new CSS class.
idea:
We check the old tree, if the node exists there. If so, we move the real dom of the node to the new spot.
Now this is the part, which is a bit hack-ish (feels smart though). While we can not touch the new vnode (would just break the state completely), we actually put the node into the new spot, just inside the old tree.
This way, the delta comparisons of the old and new node will happen out of the box.
It is an expensive search task, but reduces the work once the engine arrives at the modified child array: We do not get additional index changes, since the arrays are in sync.
The change did not break any other test cases, but needs some testing.