TreeDiffer
live Produces a minimal list of DiffOp operations that transform an existing list of child Nodes to reflect a new list of child Elements. The algorithm prioritizes keyed matching, then falls back to positional matching for unkeyed elements of the same type. This is an internal framework type not intended for direct use.
Methods
Diff
Computes the diff between an old node list and a new element list.
| Parameter | Description |
|---|---|
oldNodes | Current child nodes of the parent. |
newElements | Desired child elements from the latest build. |
Returns: An ordered list of operations to apply. Operations are ordered so that Remove operations appear first, followed by Insert, Update, and Move operations in new-index order.
Last updated on