Hi, I have a question regarding the autocomplete combobox featured under demos and documentation in the jquery UI site. The combobox that displays either a compete list of options or options filtered by the input field seems to filter everything that matches the input field. f. ex a gives med a, bac and cba. Is there a possibility to force it to only filter results starting with a. Kinda like one would do with ^ and $ ? I see that the regexp in the change method already uses ^ and $ but it still filters out everything that contains a and not just the results starting with a... Anyone have any good suggestions?
No worries, figured it out by putting: "^" at the start of :
Filters everything:
var matcher = new RegExp( $.ui.autocomplete.escapeRegex(request.term), "i" );
Filters matches from start:
var matcher = new RegExp( "^" + $.ui.autocomplete.escapeRegex(request.term), "i" );