Api: Make sure parent properties and @property properties are included in clone

This commit is contained in:
nathan 2024-01-19 12:42:25 -07:00
parent 68cd3479fd
commit 926c3f9260
2 changed files with 6 additions and 6 deletions

View File

@ -1196,11 +1196,11 @@ const Et2WidgetMixin = <T extends Constructor>(superClass : T) =>
}
let widget_class = window.customElements.get(this.localName);
let properties = widget_class ? widget_class.properties : [];
for(let key in properties)
let properties = widget_class ? widget_class.elementProperties : [];
properties.forEach((v, key) =>
{
copy[key] = this[key];
}
});
// Keep the deferred properties
copy._deferred_properties = this._deferred_properties;

View File

@ -296,11 +296,11 @@ export class et2_nextmatch_rowProvider
// N.B. cloneNode widget is missing its unreflected properties and we need to get them from original
let widget_class = window.customElements.get(widget.localName);
let properties = widget_class ? widget_class.properties : [];
for(let key in properties)
let properties = widget_class ? widget_class.elementProperties : [];
properties.forEach((v, key) =>
{
widget[key] = original[key];
}
});
if(!widget || widget.localName !== entry.widget.localName)
{