alexjoverm / v-runtime-template

Vue component for compiling templates on the fly using a v-html like API
MIT License
605 stars 72 forks source link

Modifying parent properties triggers repaint #56

Open danieltamas opened 5 years ago

danieltamas commented 5 years ago

When the parent's data is modified from the template, it triggers a repaint on the parent.

This breaks already initialised components ( like sliders )

pascalporedda commented 5 years ago

Yep experiencing the same behaviour, wondering if that is somewhat fixable?

neberaa commented 5 years ago

Faced with the same problem creating tabs. Each tab may contains html raw with uncompiled Vue js component cames from backend. v-runtime-template create/destroy each component on every tab change ((

danieltamas commented 5 years ago

The problem I suspect is the parent node gets merged into the new node, whereas it should be the other way around, to avoid destroying the parent node

neberaa commented 4 years ago

In my case i'm just switching a css class. Nothing else. Anyway it should not be rerendered each time on class list change. Definitely keep-alive property need to be implemented (as native dynamic components have)

SikoSoft commented 4 years ago

I am experiencing infinite loop event handling, which is the result of this bug.

In an attempt to take better control over when a component's images are all loaded, I tried this library, then attached @load to the images, which in turn triggers an event handler that increments the number of images loaded.

Because the handler increments the component's "imagesLoaded" property, a re-render is performed, causing an infinite loop.

This is a major performance glitch which renders this library unfortunately unusable for me.

Since this project is no longer maintained, I'd be very careful when using it because it has great potential for harm as it is now!