mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-23 07:09:20 +01:00
Fix buttons with image but no label didn't always size correctly
This commit is contained in:
parent
e984ccf9a4
commit
44c331f69d
@ -151,11 +151,22 @@ export class Et2Button extends Et2InputWidget(SlButton)
|
||||
|
||||
}
|
||||
|
||||
connectedCallback()
|
||||
protected firstUpdated(_changedProperties : PropertyValues)
|
||||
{
|
||||
super.connectedCallback();
|
||||
super.firstUpdated(_changedProperties);
|
||||
|
||||
//this.classList.add("et2_button")
|
||||
if(!this.label && this.__image)
|
||||
{
|
||||
/*
|
||||
Label / no label should get special classes set, but they're missing without this extra requestUpdate()
|
||||
This is a work-around for button--has-prefix & button--has-label not being set, something to do
|
||||
with how we're setting them.
|
||||
*/
|
||||
this.updateComplete.then(() =>
|
||||
{
|
||||
this.requestUpdate();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
set label(new_label : string)
|
||||
|
Loading…
Reference in New Issue
Block a user