LearnNewsExamplesServices
Frontmatter
id6132
titleCovid.view.MainContainerController: applySummaryData() => vdom access
stateClosed
labels
enhancement
assigneestobiu
createdAtNov 29, 2024, 3:49 PM
updatedAtNov 29, 2024, 4:08 PM
githubUrlhttps://github.com/neomjs/neo/issues/6132
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtNov 29, 2024, 4:08 PM

Covid.view.MainContainerController: applySummaryData() => vdom access

Closed v8.1.0 enhancement
tobiu
tobiu commented on Nov 29, 2024, 3:49 PM
    applySummaryData(data) {
        let me        = this,
            container = me.getReference('total-stats'),
            {vdom}    = container;

        me.summaryData = data;

        vdom.cn[0].cn[1].html = Util.formatNumber({value: data.cases});
        vdom.cn[1].cn[1].html = Util.formatNumber({value: data.active});
        vdom.cn[2].cn[1].html = Util.formatNumber({value: data.recovered});
        vdom.cn[3].cn[1].html = Util.formatNumber({value: data.deaths});

        container.update();
        // ...
    }

this logic can no longer work in neo v8 => vdom.cn[0] => {componentId: 'neo-component-2'}

we either need to aggregate the vdom tree or access the child cmps directly to update in parallel.

tobiu added the enhancement label on Nov 29, 2024, 3:49 PM
tobiu assigned to @tobiu on Nov 29, 2024, 3:49 PM
tobiu referenced in commit 8962fa2 - "Covid.view.MainContainerController: applySummaryData() => vdom access #6132" on Nov 29, 2024, 4:08 PM
tobiu closed this issue on Nov 29, 2024, 4:08 PM