ComboGrid.js: allow to select empty value

This commit is contained in:
Dietmar Maurer 2011-10-27 09:42:46 +02:00
parent badcb8d162
commit 8f630c2984

View File

@ -13,6 +13,20 @@ Ext.define('PVE.form.ComboGrid', {
return (count > 10) ? 10*lh : 26+count*lh; 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) {
var me = this;
var key = e.getKey();
if (!me.editable && me.allowBlank && !me.multiSelect &&
(key == e.BACKSPACE || key == e.DELETE)) {
me.setValue('');
}
me.callParent(arguments);
},
// copied from ComboBox // copied from ComboBox
createPicker: function() { createPicker: function() {
var me = this, var me = this,