info widget: early return from update if text & value stayed the same
No need then and if we'd call into update we'd still generate new elements which is annoying for debugging and extra DOM work we can avoid. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
1d3d61ead9
commit
76899da698
@ -59,7 +59,14 @@ Ext.define('Proxmox.widget.Info', {
|
||||
},
|
||||
|
||||
updateValue: function(text, usage) {
|
||||
var me = this;
|
||||
let me = this;
|
||||
|
||||
if (me.lastText === text && me.lastUsage === usage) {
|
||||
return;
|
||||
}
|
||||
me.lastText = text;
|
||||
me.lastUsage = usage;
|
||||
|
||||
var label = me.getComponent('label');
|
||||
label.update(Ext.apply(label.data, { title: me.title, usage: text }));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user