Search starts after typing two characters
diegogaitan opened this issue · comments
Is it possible to start the search after typing one character only? No request is sent to the server when I type the first character.
Thanks in advance.
https://github.com/crowdint/rails3-jquery-autocomplete/tree/master/lib/assets/javascripts
You can locate the above mentioned java script files of gem in your local and change the value manually.
Just open the files and find "2". You will see code like.
if ( term.length < 2 ) {
return false;
}
Replace "2" with your desired length. Don't forget to restart server.
There's an open PR (#169) with this functionality from 8 months ago. I hope merge someday..
No chance to see this feature in the options attribute ?
@charlesdg follow this pull request #169
Please add following attribute on element.
'min-length' => 1
or any value you want it to be. Here search starts after 1 character.