Can I override the dijit/form/_AutoCompleterMixin to match any part of string not only beginning string?

81 Views Asked by At

I have a customized single select on ibm bpm using the dojo toolkit. It is implemented from dijit.form.FilteringSelect which extends dijit.form.ComboboxMixin which extends dijit/form/_AutoCompleterMixin where if user types in a partial string, highlight the entries in the drop down list that start with that partial string

I need if user types in a partial string, highlight the entries in the drop down list that CONTAIN with that partial string.

So Is it possible I override this dojo component? and what are the risks?

1

There are 1 best solutions below

0
Carlos Nantes On

You can enable substring search when using FilteringSelect component as follows:

var obj = new FilteringSelect({
  queryExpr:"*${0}*", //enables substring search
  autoComplete:false, //prevents autocomplete
  //other arguments
});

Here is a working sample: https://codepen.io/carlosnantes/pen/JjPXYeJ