mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 00:13:35 +01:00
* NewsAdmin: fix creating of new categories
deferring setting the label, if parentNode is not yet there
This commit is contained in:
parent
b1c3b07c45
commit
5818d4bfc0
@ -373,15 +373,25 @@ const Et2InputWidgetMixin = <T extends Constructor<LitElement>>(superclass : T)
|
|||||||
this.label = pre;
|
this.label = pre;
|
||||||
if(post?.trim().length > 0)
|
if(post?.trim().length > 0)
|
||||||
{
|
{
|
||||||
const label = document.createElement("et2-description");
|
const update = () => {
|
||||||
label.innerText = post;
|
const label = document.createElement("et2-description");
|
||||||
// Put in suffix, if parent has a suffix slot
|
label.innerText = post;
|
||||||
if(this.parentNode?.shadowRoot?.querySelector("slot[name='suffix']"))
|
// Put in suffix, if parent has a suffix slot
|
||||||
{
|
if(this.parentNode?.shadowRoot?.querySelector("slot[name='suffix']"))
|
||||||
label.slot = "suffix";
|
{
|
||||||
}
|
label.slot = "suffix";
|
||||||
|
}
|
||||||
|
|
||||||
this.parentNode.append(label);
|
this.parentNode.append(label);
|
||||||
|
}
|
||||||
|
if (this.parentNode)
|
||||||
|
{
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
window.setTimeout(update, 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user