forked from extern/egroupware
Reflect properties into DOM attributes, it's faster
This commit is contained in:
parent
5bdf12f1b9
commit
0f45aed876
@ -50,20 +50,23 @@ export class Et2Description extends Et2Widget(LitElement) implements et2_IDetach
|
|||||||
* Goes with href. If provided, that's the target for opening the link.
|
* Goes with href. If provided, that's the target for opening the link.
|
||||||
*/
|
*/
|
||||||
extra_link_target: {
|
extra_link_target: {
|
||||||
type: String
|
type: String,
|
||||||
|
reflect: true
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* widthxheight, if popup should be used, eg. 640x480
|
* widthxheight, if popup should be used, eg. 640x480
|
||||||
*/
|
*/
|
||||||
extra_link_popup: {
|
extra_link_popup: {
|
||||||
type: String
|
type: String,
|
||||||
|
reflect: true
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Link URL
|
* Link URL
|
||||||
* If provided, will be clickable and open this URL
|
* If provided, will be clickable and open this URL
|
||||||
*/
|
*/
|
||||||
href: {
|
href: {
|
||||||
type: String
|
type: String,
|
||||||
|
reflect: true
|
||||||
},
|
},
|
||||||
value: String,
|
value: String,
|
||||||
}
|
}
|
||||||
|
@ -178,15 +178,19 @@ export class et2_nextmatch_rowProvider
|
|||||||
data[set.attribute] = mgrs["content"].expandName(set.expression);
|
data[set.attribute] = mgrs["content"].expandName(set.expression);
|
||||||
}
|
}
|
||||||
// WebComponent IS the node, and we've already cloned it
|
// WebComponent IS the node, and we've already cloned it
|
||||||
// N.B. it's missing its unreflected (internal) properties
|
|
||||||
if(typeof window.customElements.get(widget.localName) != "undefined")
|
if(typeof window.customElements.get(widget.localName) != "undefined")
|
||||||
{
|
{
|
||||||
// Use the clone, not the original
|
/*
|
||||||
|
// N.B. cloneNode widget is missing its unreflected properties and we need to use widget.clone()
|
||||||
|
// instead to get them. This slows things down.
|
||||||
let c = widget.clone();
|
let c = widget.clone();
|
||||||
let partial = entry.nodeFuncs[0](row);
|
let partial = entry.nodeFuncs[0](row);
|
||||||
partial.parentNode.insertBefore(c, partial);
|
partial.parentNode.insertBefore(c, partial);
|
||||||
partial.parentNode.removeChild(partial);
|
partial.parentNode.removeChild(partial);
|
||||||
widget = c;
|
widget = c;
|
||||||
|
*/
|
||||||
|
// Use the clone, not the original
|
||||||
|
widget = entry.nodeFuncs[0](row);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user