[pve-devel] [PATCH pve-manager 2/2] Do not try to enforce a Picker size manually, let the framework do it

Emmanuel Kasper e.kasper at proxmox.com
Thu Dec 10 15:08:01 CET 2015


The Picker of the ComboBox, has by default a maxHeight of 300 px. If the list of elements is bigger that 300 pixels, then a scrollbar will be added.
This behaviour was broken with ExtJS4, but now works correctly with ExtJS6.
---
 www/manager6/form/ComboGrid.js | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/www/manager6/form/ComboGrid.js b/www/manager6/form/ComboGrid.js
index 26a57b4..a226cb5 100644
--- a/www/manager6/form/ComboGrid.js
+++ b/www/manager6/form/ComboGrid.js
@@ -5,13 +5,6 @@ Ext.define('PVE.form.ComboGrid', {
     // this value is used as default value after load()
     preferredValue: undefined,
 
-    computeHeight: function() {
-	var me = this;
-	var lh = PVE.Utils.gridLineHeigh();
-	var count = me.store.getTotalCount();
-	return (count > 10) ? 10*lh : 26+count*lh;
-    },
-
     // hack: allow to select empty value
     // seems extjs does not allow that when 'editable == false'
     onKeyUp: function(e, t) {
@@ -43,7 +36,6 @@ Ext.define('PVE.form.ComboGrid', {
             store: me.store,
             displayField: me.displayField,
             focusOnToFront: false,
-	    height: me.computeHeight(),
             pageSize: me.pageSize
         }, me.listConfig, me.defaultListConfig);
 
@@ -60,7 +52,6 @@ Ext.define('PVE.form.ComboGrid', {
             itemclick: me.onItemClick,
             refresh: me.onListRefresh,
 	    show: function() {
-		picker.setHeight(me.computeHeight());
 		me.syncSelection();
 	    },
             scope: me
-- 
2.1.4




More information about the pve-devel mailing list