Support loading children into slots in selects

This commit is contained in:
nathan 2024-02-20 08:26:55 -07:00
parent 90c340cf2a
commit 1bba32f088

View File

@ -378,6 +378,20 @@ export const Et2WidgetWithSelectMixin = <T extends Constructor<LitElement>>(supe
{
this.select_options = new_options;
}
let others = _node.querySelectorAll(":not(option)");
// Load the child nodes.
others.forEach((node) =>
{
let widgetType = node.nodeName.toLowerCase();
if(widgetType == "#comment" || widgetType == "#text")
{
return;
}
// Create the new element
this.createElementFromNode(node);
});
}
}