-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot reuse element after it's detached #178
Comments
Hi, it's defined there -
Is something not working? |
Thank you for responding quickly. I am aware of that line, but here's the scenario where it fails: when the component is detached, |
You are right, thank You for bringing this up! Fixed in vue-custom-element@3.2.9 - https://github.com/karol-f/vue-custom-element/releases/tag/v3.2.9 |
We are getting an undefined instance error because the above code is not completely cleaning up after itself. In the following lines of code, the vue element instance property getter and setter has been defined/overwritten: If this is not cleaned up (i.e. delete element.prop after destroyTimeout), then accessing the property will cause an undefined error because https://github.com/karol-f/vue-custom-element/blob/master/src/utils/props.js#L95 Can this issue please be fixed? For right now, we are fixing this by deleting the property explicitly after the element is destroyed.
|
After an element is detached and then sometimes later reattached, the inner Vue component isn't recreated. It's caused by the
this.__detached__
value remains true after the component is destroyed.Shouldn't the following function set the
this.__detached__
back to false at the end?vue-custom-element/src/vue-custom-element.js
Lines 51 to 56 in 10fe7a0
The text was updated successfully, but these errors were encountered: