nativescript-community / ui-collectionview

Allows you to easily add a collection view (grid list view) to your projects. Supports vertical and horizontal modes, templating, and more.
Apache License 2.0
59 stars 18 forks source link

fix(vue): properly dispose vnodes #51

Closed rigor789 closed 1 year ago

rigor789 commented 1 year ago

This fixes issue my previous PR fixed in #50 however also accounts for cases where the template/root vnode is not a component but a layout like <GridLayout>.

With this change, we patch the vnode with a null vnode - causing vue to properly dispose the whole subtree and triggering all the beforeDestroy and destroyed hooks correctly.