Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by walter on Dec 14, 2007 12:03
open dhtmlx forum
filtering and auto-complete, but not limited to begining of string...

Here's one for you!

I've just been given the requirement that the client wants to be able to type any character and the list will filter to all items that contain that character in it.

Current behavior limits entry/filters to beginning of item strings. Now they they want the filter from any position.

Can this be done?

Walter
Answer posted by Support on Dec 17, 2007 02:24
Can't be changed by API, but pretty easy to modify , just locate next line in dhtmlxcombo.js ( line 904 in latest code )
    var filter=new RegExp("^"+text,"i");
and update it as
    var filter=new RegExp(text,"i");

Answer posted by Walter on Dec 17, 2007 08:37
Thanks for the reply.


But where can I get a copy of the source that is not "compressed"?
Answer posted by Support on Dec 17, 2007 09:57
The package must contain both versions
    codebase - compressed version
    source - not compressed version of code