JQuery autocomplete minLength

Autocomplete never works when entering the first character, but the 2nd. Although after using back-space it works for minLength = 1 . In addition, selectFirst: true is not assigned to the first element of the array by default when the page loads.

$().ready(function (){ 
       $('#CompanyName').autocomplete({
                 source: companyNames,
                 select: SetLocations, 
                 selectFirst :true,
                 minLength: 0  //corrected as suggested, but still no change
      });
});

Has anyone encountered this behavior before. I do not know, since I do not have global settings / defaults.

+5
source share
1 answer

, document.ready ( ) , :

$(function() {
   $('#CompanyName').autocomplete({
             source: companyNames,
             select: SetLocations, 
             selectFirst: true, //here
             minLength: 0
  });
});

, minLength , , 0, :

minLength. , . Zero . , , .

.....

+11

All Articles