4.2 ComboBox Query Enhancements

First, please add config options to combobox for anyMatch and caseSensitive, which are passed to the stored queryFilter.

Second, please add code to the top of doQuery for:

Code:

if( queryString.length < this.minChars ) {
forceAll = true;
}

Because when using field validation (allowBlank: false, forceSelection: true, typeAhead: true), and deleting values typed into the combo box, the full list does not appear (basically forceAll isn't being forced to true).

My understanding of minChars is that it's to be used with very large, remote datasets where a short query is too small to meaningfully filter the results set. It kind of defeats the purpose if the user can just delete their way around it.

Could a beforequery listener not be used to achieve the desired effect without any modifications to combobox itself?

I'm not sure it's intuitive for minChars to behave differently for local and remote data. Personally I think it would make more sense for the picker to be automatically hidden if the number of characters drops below minChars, though that would be a change of long-established behaviour.

In my opinion the main change that is required is to split up the monolith of doQuery to give a few nice template methods for hooking in these kinds of customizations. I've lost count of the number of times that I've seen someone have to copy and paste that whole crazy method just to make a tiny change for their specific use-case.

A few overridable methods and a bit of documentation and everything would be super-flexible without adding a load of new config options. The documentation here is key, e.g. the existing beforequery event is massively powerful but very few people understand how to use it.