[pve-devel] [PATCH manager 1/6] ui: StorageScanNodeSelector: use null as empty value
Dominik Csapak
d.csapak at proxmox.com
Wed Jan 18 14:12:58 CET 2023
otherwise it can happen that there as additional change event from
null to '', even though the value did not change
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
www/manager6/form/StorageScanNodeSelector.js | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/www/manager6/form/StorageScanNodeSelector.js b/www/manager6/form/StorageScanNodeSelector.js
index d6c9508a1..b2e013e9c 100644
--- a/www/manager6/form/StorageScanNodeSelector.js
+++ b/www/manager6/form/StorageScanNodeSelector.js
@@ -9,7 +9,7 @@ Ext.define('PVE.form.StorageScanNodeSelector', {
disallowedNodes: undefined,
autoSelect: false,
submitValue: false,
- value: "",
+ value: null,
autoEl: {
tag: 'div',
'data-qtip': gettext('Scan for available storages on the selected node'),
@@ -18,14 +18,16 @@ Ext.define('PVE.form.StorageScanNodeSelector', {
clear: {
handler: function() {
let me = this;
- me.setValue("");
+ me.setValue(null);
},
},
},
+ emptyText: Proxmox.NodeName,
+
setValue: function(value) {
let me = this;
me.callParent([value]);
- me.triggers.clear.setVisible(value !== "");
+ me.triggers.clear.setVisible(!!value);
},
});
--
2.30.2
More information about the pve-devel
mailing list