mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-22 05:00:58 +01:00
Fix slotted templates / components weren't slotting properly in kdots
This commit is contained in:
parent
35b768f5d2
commit
6829441320
@ -425,8 +425,20 @@ export class EgwFrameworkApp extends LitElement
|
||||
{
|
||||
return;
|
||||
}
|
||||
// Move top level slotted components (slot watcher will requestUpdate)
|
||||
etemplate.widgetContainer.getDOMNode().querySelectorAll(":scope > [slot]").forEach(node => {this.appendChild(node);});
|
||||
|
||||
// Move templates with slots
|
||||
const slottedTemplates = etemplate.DOMContainer.querySelectorAll(":scope > [slot]");
|
||||
slottedTemplates.forEach(node => {this.appendChild(node);});
|
||||
|
||||
// Move top level slotted components
|
||||
const slottedWidgets = etemplate.widgetContainer.querySelectorAll(":scope > [slot]")
|
||||
slottedWidgets.forEach(node => {this.appendChild(node);});
|
||||
|
||||
// Request update, since slotchanged events are only fired when the attribute changes and they're already set
|
||||
if(slottedTemplates.length > 0 || slottedWidgets.length > 0)
|
||||
{
|
||||
this.requestUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user