[pve-devel] [PATCH manager 2/2] ext6migrate: fix selection of ComboGrid

Dominik Csapak d.csapak at proxmox.com
Thu Mar 3 14:28:47 CET 2016


if one selected an item in a ComboGrid which was already selected,
the ComboGrid would not close (as expected), this patch fixes this

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

diff --git a/www/manager6/form/ComboGrid.js b/www/manager6/form/ComboGrid.js
index 18e5309..d2c1783 100644
--- a/www/manager6/form/ComboGrid.js
+++ b/www/manager6/form/ComboGrid.js
@@ -200,6 +200,18 @@ Ext.define('PVE.form.ComboGrid', {
             scope: me
         });
 
+	// hack for extjs6
+	// when the clicked item is the same as the previously selected,
+	// it does not select the item
+	// instead we hide the picker
+	if (!me.multiSelect) {
+	    picker.on('itemclick', function (sm,record) {
+		if (picker.getSelection()[0] === record) {
+		    picker.hide();
+		}
+	    });
+	}
+
         picker.getNavigationModel().navigateOnSpace = false;
 
         return picker;
-- 
2.1.4





More information about the pve-devel mailing list