mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 00:13:35 +01:00
Fix missing button images when image was not set before first update
This commit is contained in:
parent
93167940f8
commit
e9f0a5216b
@ -11,6 +11,7 @@
|
||||
|
||||
import {css} from "@lion/core";
|
||||
import {Et2InputWidget} from "../Et2InputWidget/Et2InputWidget";
|
||||
import '../Et2Image/Et2Image';
|
||||
import {SlButton} from "@shoelace-style/shoelace";
|
||||
import shoelace from "../Styles/shoelace";
|
||||
|
||||
@ -70,7 +71,7 @@ export class Et2Button extends Et2InputWidget(SlButton)
|
||||
width: 16px !important;
|
||||
}
|
||||
::slotted(et2-image) {
|
||||
width: 20px;
|
||||
max-width: 20px;
|
||||
display: flex;
|
||||
}
|
||||
::slotted([slot="icon"][src='']) {
|
||||
|
@ -9,7 +9,7 @@
|
||||
*/
|
||||
|
||||
|
||||
import {css, html, LitElement, SlotMixin} from "@lion/core";
|
||||
import {css, html, LitElement, render, SlotMixin} from "@lion/core";
|
||||
import {Et2Widget} from "../Et2Widget/Et2Widget";
|
||||
import {et2_IDetachedDOM} from "../et2_core_interfaces";
|
||||
|
||||
@ -171,6 +171,10 @@ export class Et2Image extends Et2Widget(SlotMixin(LitElement)) implements et2_ID
|
||||
{
|
||||
super.updated(changedProperties);
|
||||
|
||||
if(changedProperties.has("src") && !this._img)
|
||||
{
|
||||
render(this._imageTemplate(), this);
|
||||
}
|
||||
if(changedProperties.has("src") && this._img)
|
||||
{
|
||||
this._img.setAttribute("src", this.parse_href(this.src) || this.parse_href(this.defaultSrc));
|
||||
|
Loading…
Reference in New Issue
Block a user