Skip to content

Commit c16d135

Browse files
committed
#6045 Scoped vdom trees: WIP
1 parent 84f7d69 commit c16d135

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

src/component/Base.mjs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1487,7 +1487,7 @@ class Base extends CoreBase {
14871487
// and we still want to pass it further into subtrees
14881488
me._needsVdomUpdate = false;
14891489
me.afterSetNeedsVdomUpdate?.(false, true);
1490-
1490+
console.log('update', me.id, vdom);
14911491
Neo.vdom.Helper.update(opts).catch(err => {
14921492
me.isVdomUpdating = false;
14931493
console.log('Error attempting to update component dom', err, me);
@@ -2296,7 +2296,7 @@ class Base extends CoreBase {
22962296
* hideMode: 'visibility' uses css visibility.
22972297
*/
22982298
show() {
2299-
const me = this;
2299+
let me = this;
23002300

23012301
if (me.hideMode !== 'visibility') {
23022302
delete me.vdom.removeDom;
@@ -2323,7 +2323,7 @@ class Base extends CoreBase {
23232323
* @param {Object} [vdom=this.vdom]
23242324
* @param {Boolean} force=false
23252325
*/
2326-
syncVdomIds(vnode = this.vnode, vdom = this.vdom, force = false) {
2326+
syncVdomIds(vnode=this.vnode, vdom=this.vdom, force=false) {
23272327
VDomUtil.syncVdomIds(vnode, vdom, force)
23282328
}
23292329

@@ -2347,6 +2347,9 @@ class Base extends CoreBase {
23472347

23482348
// delegate the latest node updates to all possible child components found inside the vnode tree
23492349
ComponentManager.getChildren(me).forEach(component => {
2350+
if (!component.vdom.id) {
2351+
console.log(component.id, component.vdom);
2352+
}
23502353
childVnode = VNodeUtil.findChildVnode(me.vnode, component.vdom.id);
23512354

23522355
if (childVnode) {

src/container/Base.mjs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -387,11 +387,7 @@ class Base extends Component {
387387

388388
if (item instanceof Neo.core.Base) {
389389
layout?.applyChildAttributes(item, index);
390-
vdom = {componentId: item.id};
391-
392-
if (item.vdom.removeDom) {
393-
vdom.removeDom = true
394-
}
390+
vdom = {componentId: item.id}
395391
} else {
396392
vdom = item.vdom
397393
}

src/util/VDom.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,7 @@ class VDom extends Base {
385385
// we only want to change vdom ids in case there is not already an own id
386386
// (think of adding & removing nodes in parallel)
387387
if (!vdom.id && vnode.id) {
388+
console.log(vnode.id, vdom);
388389
vdom.id = vnode.id
389390
}
390391
}

0 commit comments

Comments
 (0)