You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
a vanX.list items are dictionary (Object) itemFunc is returning DocumentFragment
calling vanX.replace to update the items of the list. Adding is fine, changing value is fine, but it fails when a key from the items object is removed.
Fails the same way if (vanX.list) items is an array and trying to vanX.replace with fewer items than current state.
main.js:21 triggered
van-x.nomodule.js:75 Uncaught (in promise) TypeError: keyToChild[k]?.remove is not a function
at onDelete (van-x.nomodule.js:75:22)
at Object.deleteProperty (van-x.nomodule.js:49:35)
at replaceInternal (van-x.nomodule.js:97:61)
at Object.replace (van-x.nomodule.js:118:14)
at fetchstuff (main.js:22:10)
If I remove the DocumentFragment (ie letting GridRow return a div instead) it works fine, but my grid doesn't (no parent node in a css grid row)
Love VanJS by the way :)
The text was updated successfully, but these errors were encountered:
VanJS doesn't support binding function to return a DocumentFragment. This is due to the limit of DOM. DocumentFragment is not a real element in the DOM true, its children will be fused into its parent element during the DOM tree construction.
Example fidle: https://jsfiddle.net/nudhLf6x/3/
a vanX.list items are dictionary (Object) itemFunc is returning DocumentFragment
calling vanX.replace to update the items of the list. Adding is fine, changing value is fine, but it fails when a key from the items object is removed.
Fails the same way if (vanX.list) items is an array and trying to vanX.replace with fewer items than current state.
If I remove the DocumentFragment (ie letting GridRow return a div instead) it works fine, but my grid doesn't (no parent node in a css grid row)
Love VanJS by the way :)
The text was updated successfully, but these errors were encountered: