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

Local state changes do not update runtime-template #1

Closed pepf closed 6 years ago

pepf commented 6 years ago

I tried creating an "editable props" example using the runtime template to render the component on the fly. However, the runtime template creates an anonymous component with the "data" set from the "data()" function of the parent.

This never changes after component initialisation, therefore changes to parent state will never update in the anonymous component. I think it would be nice (maybe optionally) to allow updates to the component local state, just as you can update the template :)

Example https://codesandbox.io/s/vjylx5kq4l

alexjoverm commented 6 years ago

Fixed by version 1.5.0. See your demo with the latest version working :D https://codesandbox.io/s/1yrlqjo41l