PDA

View Full Version : SimpleComboBox selection stuck



alexworden
16 Aug 2010, 11:39 AM
Hi,

I'm creating a SimpleComboBox with several items. Once a single item is selected from the drop down, if I click on the drop-down again, all of the other options are missing. If I make the ComboBox editable (which I don't want) I can delete that entry from the text field and then all of the other options are once again displayed. It's obviously doing some kind of filtering. I can't believe how retarded this default behavior is!

How do I turn it off so I can just see my options every time?

Thanks

Alex

sven
16 Aug 2010, 11:41 AM
box.setTriggerAction(TriggerAction.ALL);

alexworden
16 Aug 2010, 11:55 AM
Thank you Sven! That worked!

Do you know where the documentation is that would explain this behavior? I just read the Javadoc and I am non-the-wiser.

Thanks,

Alex

sven
16 Aug 2010, 11:57 AM
The triggeraction defaults to TriggerAction.QUERY (this is what is documented). This means only the models that would match are shown in the dropdown.

alexworden
16 Aug 2010, 12:17 PM
OK. Perhaps it's a problem with the website but I cannot find the documentation. Please can you post a link or explain where I should be looking.

Thanks!

Alex

sven
16 Aug 2010, 12:19 PM
http://dev.sencha.com/deploy/gxtdocs/com/extjs/gxt/ui/client/widget/form/ComboBox.html#setTriggerAction%28com.extjs.gxt.ui.client.widget.form.ComboBox.TriggerAction%29