The auto-suggestion list provided by the DHTMLX Combo is updated on every keystroke but apparently uses prefix-matching only. How do I change the logic to match anywhere in the option's text.
E.g. in the below fiddle:
https://jsfiddle.net/wra8etjw/2/
I would like the suggestion for "Three" to show up even when I type "ee" in the box. I've read the documentation on custom filtering but neither the custom filtering approach nor the user-defined function got me anywhere.
I am using a DHTMLX Combo box in a rudimentary way. Namely the options are present as a literal in the HTML file served from the server (they are pretty static), so the onDynXLS
is never fired (there's no Ajax going on).
My other idea was to capture the current value that the user is typing, save it to some global variable and then provide a user-defined filtering function that would return true on all values in which the current value is present (not just as a prefix). This also failed as apparently the user-defined filtering function is only called on page load, not on every keystroke inside the input text. Moreover, I don't know which even to use to capture key strokes inside the Combo's input text and obtain the current value.
So my questions are:
- how to make the list of suggestions show values where the current text exists as a substring anywhere in them, and not just as a prefix?
Use enableFilteringMode('between')
- how to capture keystrokes in the Combo's input text and obtain the current value as the user is typing?
Easiest way IMO is to attach a handler in the underlying input
element the Combo uses.
Updated fiddle here