Do not try to enforce a Picker size manually, let the framework do it

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.
This commit is contained in:
Emmanuel Kasper 2015-12-10 15:08:01 +01:00 committed by Dietmar Maurer
parent a13842bf0e
commit 2ad16f261f

View File

@ -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