[pve-devel] [PATCH manager 5/7] ext6migrate: fix NodeSelector

Dominik Csapak d.csapak at proxmox.com
Tue Mar 8 11:03:55 CET 2016


the intial value of the node selector is null,
but when the store is loaded, it becomes an empty array

this triggers the 'dirtychanged' event and causes
the edit windows to enable the OK/Submit Button,
even when no change is made

this fix sets the default value to an empty array,
which fixes the mentioned behaviour

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/manager6/form/NodeSelector.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/www/manager6/form/NodeSelector.js b/www/manager6/form/NodeSelector.js
index ca55341..2a7f013 100644
--- a/www/manager6/form/NodeSelector.js
+++ b/www/manager6/form/NodeSelector.js
@@ -9,7 +9,10 @@ Ext.define('PVE.form.NodeSelector', {
 
     // only allow those nodes (array)
     allowedNodes: undefined,
-
+    // set default value to empty array, else it inits it with
+    // null and after the store load it is an empty array,
+    // triggering dirtychange
+    value: [],
     valueField: 'node',
     displayField: 'node',
     store: {
-- 
2.1.4





More information about the pve-devel mailing list