mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 23:00:56 +01:00
Fix changing select options did not properly clear previous options
This commit is contained in:
parent
01a08447cb
commit
8514792efc
@ -153,14 +153,10 @@ export const Et2widgetWithSelectMixin = <T extends Constructor<LitElement>>(supe
|
||||
return Promise.all(([...temp_target.querySelectorAll(":scope > *")].map(item => item.render)))
|
||||
.then(() =>
|
||||
{
|
||||
temp_target.querySelectorAll(":scope > *").forEach((item) =>
|
||||
{
|
||||
// Avoid duplicate error
|
||||
if(!this._optionTargetNode.querySelector("[value='" + item.value.replace(/'/g, '\\\'') + "']"))
|
||||
{
|
||||
this._optionTargetNode.appendChild(item);
|
||||
}
|
||||
});
|
||||
this._optionTargetNode.replaceChildren(
|
||||
...Array.from(temp_target.querySelectorAll(":scope > *")),
|
||||
...Array.from(this._optionTargetNode.querySelectorAll(":scope > [slot]"))
|
||||
);
|
||||
if(typeof this.handleMenuSlotChange == "function")
|
||||
{
|
||||
this.handleMenuSlotChange();
|
||||
|
Loading…
Reference in New Issue
Block a user