mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-08 06:38:39 +00:00
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:
parent
a13842bf0e
commit
2ad16f261f
@ -5,13 +5,6 @@ Ext.define('PVE.form.ComboGrid', {
|
|||||||
// this value is used as default value after load()
|
// this value is used as default value after load()
|
||||||
preferredValue: undefined,
|
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
|
// hack: allow to select empty value
|
||||||
// seems extjs does not allow that when 'editable == false'
|
// seems extjs does not allow that when 'editable == false'
|
||||||
onKeyUp: function(e, t) {
|
onKeyUp: function(e, t) {
|
||||||
@ -43,7 +36,6 @@ Ext.define('PVE.form.ComboGrid', {
|
|||||||
store: me.store,
|
store: me.store,
|
||||||
displayField: me.displayField,
|
displayField: me.displayField,
|
||||||
focusOnToFront: false,
|
focusOnToFront: false,
|
||||||
height: me.computeHeight(),
|
|
||||||
pageSize: me.pageSize
|
pageSize: me.pageSize
|
||||||
}, me.listConfig, me.defaultListConfig);
|
}, me.listConfig, me.defaultListConfig);
|
||||||
|
|
||||||
@ -60,7 +52,6 @@ Ext.define('PVE.form.ComboGrid', {
|
|||||||
itemclick: me.onItemClick,
|
itemclick: me.onItemClick,
|
||||||
refresh: me.onListRefresh,
|
refresh: me.onListRefresh,
|
||||||
show: function() {
|
show: function() {
|
||||||
picker.setHeight(me.computeHeight());
|
|
||||||
me.syncSelection();
|
me.syncSelection();
|
||||||
},
|
},
|
||||||
scope: me
|
scope: me
|
||||||
|
Loading…
Reference in New Issue
Block a user