Extjs combobox default filters with the start of the combobox item i.e. if one of the combobox item's display value is 'United States' then typing 'Uni' will provide 'United States'. However if you type 'ted' or 'ates' it will not provide 'United States' in the filter list.
Also the combobox default filter is case sensitive i.e. if you type 'uni' then it does not list out 'United States'.
To overcome above restrictions and allow subsearch and case insensitive filter we need to override the combobox (specially the doQuery method).
Following code shows how to override the Extjs combobox to allow any match and case insensitive filter search.
In above example we have overridden the combobox doQuery method to perform any match and also customized the combobox caseSensitive check.
Also we have overridden the onTypeAhead method so as to filter the content based on whatever the substring is provided. If this method is not overridden then on typeAhead filter will be reset to the first character of the matching text.
Once we are done with overriding the combobox, we can use anyMatch and caseSensitive attributes to specify whether we want complete word search or case sensitive search for combobox.
Note : The anyMatch custom attribute is defaulted to false so as to continue with existing combobox functionality. In order to perform any substring match you need to pass true value to combobox config. Whereas caseSensitive is defaulted to false to allow case insensitive check by default. If you want to restrict the case sensitivity then pass the config attribute value as true.