neo.mjs 4.0.75 → 4.0.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/component/Base.mjs +15 -13
package/package.json
CHANGED
package/src/component/Base.mjs
CHANGED
@@ -1567,22 +1567,24 @@ class Base extends CoreBase {
|
|
1567
1567
|
|
1568
1568
|
// keep the vnode parent tree in sync
|
1569
1569
|
ComponentManager.getParents(me).forEach((component, index) => {
|
1570
|
-
if (
|
1571
|
-
if (
|
1572
|
-
|
1573
|
-
|
1570
|
+
if (component._vnode) {
|
1571
|
+
if (!me.vnode) {
|
1572
|
+
if (index === 0 && !VNodeUtil.removeChildVnode(component.vnode, me.id)) {
|
1573
|
+
// This can fail, in case the vnode is already removed (not an issue, better safe than sorry)
|
1574
|
+
// console.warn('syncVnodeTree: Could not remove the parent vnode for', me.id, component);
|
1575
|
+
}
|
1574
1576
|
}
|
1575
|
-
}
|
1576
1577
|
|
1577
|
-
|
1578
|
-
|
1579
|
-
|
1580
|
-
|
1581
|
-
|
1578
|
+
// check for dynamically rendered components which get inserted into the component tree
|
1579
|
+
else if (index === 0 && me.vnode.outerHTML) {
|
1580
|
+
// console.log('dyn item', me.vnode, me.parentIndex);
|
1581
|
+
component.vnode.childNodes.splice(me.parentIndex || 0, 0, me.vnode);
|
1582
|
+
}
|
1582
1583
|
|
1583
|
-
|
1584
|
-
|
1585
|
-
|
1584
|
+
else if (!VNodeUtil.replaceChildVnode(component.vnode, me.vnode.id, me.vnode)) {
|
1585
|
+
// todo: can happen for dynamically inserted container items
|
1586
|
+
// console.warn('syncVnodeTree: Could not replace the parent vnode for', me.vnode.id, component);
|
1587
|
+
}
|
1586
1588
|
}
|
1587
1589
|
});
|
1588
1590
|
|