Skip to content

Cannot reuse element after it's detached #178

Closed
@dsuryd

Description

@dsuryd

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?

options.destroyTimeout !== null && setTimeout(() => {
if (this.__detached__ && this.__vue_custom_element__) {
this.__vue_custom_element__.$destroy(true);
delete this.__vue_custom_element__;
delete this.__vue_custom_element_props__;
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions