View Full Version : Combobox incorrectly works with forceSelection: true (typeAhead is turned on)

16 May 2011, 4:10 AM
So, in short: app uses grid, with comboboxes being pulled by a JSONstore:

function generateEnumComboStore(enum) {
return new Ext.data.JsonStore({
id: enum + 'Store',
url: 'index.php?module=URMOD_PRO&action=enum&type=' + enum,
root: 'data',
idProperty: 'id',
autoLoad: true,
fields: ['id','name']
Every such store is loaded one-by-one from Ext.onReady event (each one is loaded in previous one callback), so we can state 100% that, when end user gets to the grid, he's having all stores loaded.

Comboboxes are declared in:

function generateCombo(store) {
return new Ext.form.ComboBox({
typeAhead: true,
triggerAction: 'all',
lazyRender: true,
mode: 'local',
store: store,
valueField: 'id',
displayField: 'name',
valueNotFoundText: '',
triggerAction: 'all',
forceSelection: true,
lastQuery: ''

Problem: When user pastes (using a clipboard) a value onto any combo, (value means one from displayField), in most cases typeAhead code returns first row (incorrect one), as a result.
Regular typeAhead (typing few letters on kb) works perfectly.

Anyone got similiar issues? Any hint will be greatly appreciated.
Thanks in advance.