ui: resource tree: fix showing empty tooltips

stop the tooltip show when the there is no text
this could happen for e.g. nodes that should not have a tooltip

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2023-11-10 11:12:59 +01:00 committed by Thomas Lamprecht
parent 128e8e826a
commit 1ed8e0096b

View File

@ -417,7 +417,12 @@ Ext.define('PVE.tree.ResourceTree', {
listeners: {
beforeshow: function(tip) {
let rec = me.getView().getRecord(tip.triggerElement);
tip.update(me.getToolTip(rec.data));
let tipText = me.getToolTip(rec.data);
if (tipText) {
tip.update(tipText);
return true;
}
return false;
},
},
});