LearnNewsExamplesServices
Frontmatter
id2555
titlevdom.Helper: createDeltas(), main.mixin.DeltaUpdates: remove all nodes
stateClosed
labels
enhancement
assigneestobiu
createdAtJul 1, 2021, 4:00 PM
updatedAtJul 1, 2021, 4:01 PM
githubUrlhttps://github.com/neomjs/neo/issues/2555
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJul 1, 2021, 4:01 PM

vdom.Helper: createDeltas(), main.mixin.DeltaUpdates: remove all nodes

Closed v8.1.0 enhancement
tobiu
tobiu commented on Jul 1, 2021, 4:00 PM

This is an edge case, but an important one.

While playing with the table performance demo, I added 1k rows to a table body and removed them afterwards:

Screenshot 2021-07-01 at 15 46 36

This makes no sense, in case there are literally no new children.

I added a new DeltaUpdates method: du_setTextContent(), which we can trigger with the setTextContent delta action property.

vdom.Helper: createDeltas() has now a new check for childNodes: in case the new vnode has no children and the old vnode has 1+, trigger the new delta action.

Result:

Screenshot 2021-07-01 at 15 47 27

tobiu added the enhancement label on Jul 1, 2021, 4:00 PM
tobiu assigned to @tobiu on Jul 1, 2021, 4:00 PM
tobiu referenced in commit 8b1bd98 - "vdom.Helper: createDeltas(), main.mixin.DeltaUpdates: remove all nodes #2555" on Jul 1, 2021, 4:01 PM
tobiu closed this issue on Jul 1, 2021, 4:01 PM