mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
Et2InputWidget: New strategy for splitting label, keep it in the shadowDOM
This commit is contained in:
parent
219abb15f7
commit
b3609b3f4a
@ -450,13 +450,8 @@ const Et2InputWidgetMixin = <T extends Constructor<LitElement>>(superclass : T)
|
|||||||
{
|
{
|
||||||
const label = document.createElement("et2-description");
|
const label = document.createElement("et2-description");
|
||||||
label.innerText = post;
|
label.innerText = post;
|
||||||
// Put in suffix, if parent has a suffix slot
|
// Add into shadowDOM (may go missing, in which case we need a different strategy)
|
||||||
if(this.parentNode?.shadowRoot?.querySelector("slot[name='suffix']"))
|
this.shadowRoot?.querySelector(".form-control-input").after(label);
|
||||||
{
|
|
||||||
label.slot = "suffix";
|
|
||||||
}
|
|
||||||
|
|
||||||
this.parentNode.append(label);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user