I am using a JQuery UI auto-complete. I am specifying the min length. If I specify minLength:2
I need to type 2 characters before the service fires. If I specify minLength:1
then I only need to type one character before the source service fires.
However, when I specify minLength:0
I still need to type one character. So whats the point of 0
? how is it any different than 1
? The expected, and desired, behavior would be for it to fire as soon as the input has focus...?
Ideas?
Update: For the most part karim's solution below works, however when clicking on the input the options come up and when one is clicked the source is resubmitted the empty string rather than the new option that was just selected, so the auto-complete options that come up after selecting an option are than same as if the box had been empty.
question from:
https://stackoverflow.com/questions/4604216/jquery-ui-autocomplete-minlength0-issue 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…