[pve-devel] [PATCH manager 1/3] correctly reset value of combobox
Dominik Csapak
d.csapak at proxmox.com
Thu Oct 6 12:10:26 CEST 2016
we have cases, were the original value of a combobox is an array,
but not the current value
on reset, we get an error in Ext.Array.equals, because we
did not check if the current value is also an array
this patch fixes this
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
this happens when you have an backup job with no node
selected, change something and reset it then
www/manager6/Toolkit.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/www/manager6/Toolkit.js b/www/manager6/Toolkit.js
index 7bef6f2..4640bc0 100644
--- a/www/manager6/Toolkit.js
+++ b/www/manager6/Toolkit.js
@@ -172,7 +172,8 @@ Ext.define('PVE.form.ComboBox', {
me.applyEmptyText();
// clear and set when not the same
- if (Ext.isArray(me.originalValue) && !Ext.Array.equals(me.getValue(), me.originalValue)) {
+ var value = me.getValue();
+ if (Ext.isArray(me.originalValue) && Ext.isArray(value) && !Ext.Array.equals(value, me.originalValue)) {
me.clearValue();
me.setValue(me.originalValue);
}
--
2.1.4
More information about the pve-devel
mailing list