LearnNewsExamplesServices
Frontmatter
id5559
titlevdom.Helper: add support for a boolean static vdom / vnode property
stateClosed
labels
enhancement
assigneestobiu
createdAtJul 11, 2024, 6:31 PM
updatedAtJul 12, 2024, 11:38 AM
githubUrlhttps://github.com/neomjs/neo/issues/5559
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJul 12, 2024, 11:38 AM

vdom.Helper: add support for a boolean static vdom / vnode property

Closed v8.1.0 enhancement
tobiu
tobiu commented on Jul 11, 2024, 6:31 PM

simply put: flag a node / sub-tree as static to exclude it from createDeltas() calls.

tobiu added the enhancement label on Jul 11, 2024, 6:31 PM
tobiu assigned to @tobiu on Jul 11, 2024, 6:31 PM
tobiu referenced in commit 4b28fa1 - "vdom.Helper: add support for a boolean static vdom / vnode property #5559" on Jul 12, 2024, 11:28 AM
tobiu
tobiu Jul 12, 2024, 11:38 AM
Screenshot 2024-07-12 at 11 29 07

Screenshot 2024-07-12 at 11 29 50

"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']}
    ]}
]}

Screenshot 2024-07-12 at 11 26 03

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