mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-20 18:08:02 +02:00
Et2Select: Move option rendering into its own function, call it for Et2SelectAccount. This fixes missing option/label in some cases
eg: Kanban edit column Add/Remove assigned
This commit is contained in:
parent
5ff0cd7451
commit
ddee9a2b59
@ -47,6 +47,13 @@ export class Et2SelectAccount extends Et2Select
|
|||||||
this.__accountType = 'accounts';
|
this.__accountType = 'accounts';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
firstUpdated(changedProperties?)
|
||||||
|
{
|
||||||
|
super.firstUpdated(changedProperties);
|
||||||
|
// Due to the different way Et2SelectAccount handles options, we call this explicitly
|
||||||
|
this._renderOptions();
|
||||||
|
}
|
||||||
|
|
||||||
set accountType(type : AccountType)
|
set accountType(type : AccountType)
|
||||||
{
|
{
|
||||||
this.__accountType = type;
|
this.__accountType = type;
|
||||||
|
@ -115,6 +115,21 @@ export const Et2widgetWithSelectMixin = <T extends Constructor<LitElement>>(supe
|
|||||||
|
|
||||||
// Add in actual option tags to the DOM based on the new select_options
|
// Add in actual option tags to the DOM based on the new select_options
|
||||||
if(changedProperties.has('select_options') || changedProperties.has("emptyLabel"))
|
if(changedProperties.has('select_options') || changedProperties.has("emptyLabel"))
|
||||||
|
{
|
||||||
|
// Add in options as children to the target node
|
||||||
|
this._renderOptions();
|
||||||
|
if(this.handleMenuSlotChange)
|
||||||
|
{
|
||||||
|
this.handleMenuSlotChange();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Render select_options as child DOM Nodes
|
||||||
|
* @protected
|
||||||
|
*/
|
||||||
|
protected _renderOptions()
|
||||||
{
|
{
|
||||||
// Add in options as children to the target node
|
// Add in options as children to the target node
|
||||||
if(this._optionTargetNode)
|
if(this._optionTargetNode)
|
||||||
@ -124,11 +139,6 @@ export const Et2widgetWithSelectMixin = <T extends Constructor<LitElement>>(supe
|
|||||||
this._optionTargetNode
|
this._optionTargetNode
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if(this.handleMenuSlotChange)
|
|
||||||
{
|
|
||||||
this.handleMenuSlotChange();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user