PDA

View Full Version : help: combobox on expand loading



gkassyou
26 Sep 2007, 11:02 AM
I'm trying to load the remote combobox on expand after verifying if other required fields are valid.



combo.on('expand', function() {
if (field1.isValid() & field2.isValid())
combo.load();
}


the issue is that if the fields are not valid, then the expand does not fire again when I input valid values in the fields.

Any ideas?

gkassyou
29 Sep 2007, 4:01 AM
I think this might be a bug in the combobox. If there are no results returned from a remote call then trying to expand the combobox again does not make the call anylonger.

Has anyone else seen this and is there a workarround.

Thx

Animal
29 Sep 2007, 5:53 AM
A ComboBox in remote mode always performs a query and loads the Store on expand.

Might be better to use this event: http://www.extjs.com/deploy/ext/docs/output/Ext.form.ComboBox.html#event-beforequery

You can return false and abort the expand if the other fields are not valid.