mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-09 15:00:07 +01:00
Slightly better rendering for description contents
Uses the litElement lifecycle better, updated() is called after render()
This commit is contained in:
parent
1bc26101cd
commit
cfd628e87f
@ -144,14 +144,14 @@ export class Et2Description extends Et2Widget(LitElement) implements et2_IDetach
|
|||||||
this.requestUpdate('value', oldValue);
|
this.requestUpdate('value', oldValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
requestUpdate(attribute, oldValue)
|
updated(changedProperties)
|
||||||
{
|
{
|
||||||
super.requestUpdate(...arguments);
|
super.updated(changedProperties);
|
||||||
// Due to how we do the rendering into the light DOM (not sure it's right) we need this after
|
// Due to how we do the rendering into the light DOM (not sure it's right) we need this after
|
||||||
// value change or it won't actually show up
|
// value change or it won't actually show up
|
||||||
if(["value", "href", "activateLinks"].indexOf(attribute) != -1 && this.parentNode)
|
if((changedProperties.has("value") || changedProperties.has("href") || changedProperties.has("activateLinks")) && this.parentNode)
|
||||||
{
|
{
|
||||||
this.updateComplete.then(() => render(this._renderContent(), <HTMLElement><unknown>this));
|
render(this._renderContent(), <HTMLElement><unknown>this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user