Frontmatter
| id | 5559 |
| title | vdom.Helper: add support for a boolean static vdom / vnode property |
| state | Closed |
| labels | enhancement |
| assignees | tobiu |
| createdAt | Jul 11, 2024, 6:31 PM |
| updatedAt | Jul 12, 2024, 11:38 AM |
| githubUrl | https://github.com/neomjs/neo/issues/5559 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jul 12, 2024, 11:38 AM |
vdom.Helper: add support for a boolean static vdom / vnode property
tobiu assigned to @tobiu on Jul 11, 2024, 6:31 PM

tobiu
Jul 12, 2024, 11:38 AM
"real world" test (of course not pushed) => changing the vdom of a button:
{tag: 'button', type: 'button', cn: [
{tag: 'span', cls: ['neo-button-glyph']},
{tag: 'span', cls: ['neo-button-text'], static: true},
{cls: ['neo-button-badge']},
{cls: ['neo-button-ripple-wrapper'], cn: [
{cls: ['neo-button-ripple']}
]}
]}
renders correctly, but can no longer get changed => excluded from delta updates.
<span class="neo-button-text" id="neo-vnode-2">Hello World</span>
=> the DOM will not get the static "attribute".
tobiu closed this issue on Jul 12, 2024, 11:38 AM
simply put: flag a node / sub-tree as static to exclude it from
createDeltas()calls.