dhtmlxCombo: Minimum 3 chars before start

Hi! Is there a way, that dhtmlxCombo doesn’t get startet before the user entered at least 3 characters?

I think this could make a better performance, when filtering in big databases?


Hello!


It can be done by modification in the dhtmlxcombo.js, filterSelf method:


locate the following code here


dhtmlXCombo.prototype.filterSelf = function(mode)
{
var text=this.getComboText();
if (this._xml){


and add a check of the text here:


dhtmlXCombo.prototype.filterSelf = function(mode)
{
var text=this.getComboText();
if (this._xml&&text.length>2){



Hi! Thank you for your answer, that works good. The problem is now, when the user is clearing the field (e.g. by typing backspace) and it’s empty, the box is showing all data. Is it possible to avoid that?

Best regards,

Alex


Hello


try to use attached file instead of the original one. Possibly it’ll help to resolve the issue


dhtmlxcombo.zip (9.44 KB)