Frontmatter
| id | 2555 |
| title | vdom.Helper: createDeltas(), main.mixin.DeltaUpdates: remove all nodes |
| state | Closed |
| labels | enhancement |
| assignees | tobiu |
| createdAt | Jul 1, 2021, 4:00 PM |
| updatedAt | Jul 1, 2021, 4:01 PM |
| githubUrl | https://github.com/neomjs/neo/issues/2555 |
| author | tobiu |
| commentsCount | 0 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jul 1, 2021, 4:01 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:
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 thesetTextContentdelta 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: