Hello,
Actually, this is the Default Functionality of the Typeahead Plugin. However, we too agree with you that this should not work the way it is working currently. So, we have created another code for you using the Bloodhound addon. Please replace your Existing Typeahead JS Code at the bottom of the Page with the following code:
var marquesdata = ['ALFA ROMEO', 'ASTON MARTIN', 'AUDI', 'BENTLEY', 'BMW', 'BRABUS', 'BUGATTI', 'BUICK', 'CADILLAC', 'CHEVROLET', 'CHRYSLER', 'CITROEN', 'CORVETTE', 'DACIA', 'DAEWOO', 'DAIHATSU', 'DODGE', 'FERRARI', 'FIAT', 'FORD', 'HONDA', 'HUMMER', 'HYUNDAI', 'ISUZU', 'IVECO', 'JAGUAR', 'JEEP', 'KIA', 'LADA', 'LAMBORGHINI', 'LANCIA', 'LAND ROVER', 'LEXUS', 'MARUTI', 'MASERATI', 'MAYBACH', 'MAZDA', 'MERCEDES', 'MINI', 'MITSUBISHI', 'NISSAN', 'OPEL', 'PEUGEOT', 'PIAGGIO', 'PONTIAC', 'PORSCHE', 'PROTON', 'RENAULT', 'ROLLS ROYCE', 'ROVER', 'SAAB', 'SEAT', 'SKODA', 'SMART', 'SUBARU', 'SUZUKI', 'TOYOTA', 'VOLKSWAGEN', 'VOLVO', 'AUTRE'];
var marques = new Bloodhound({
datumTokenizer: Bloodhound.tokenizers.whitespace,
queryTokenizer: Bloodhound.tokenizers.whitespace,
// `states` is an array of state names defined in "The Basics"
local: marquesdata
});
$('.typeahead').typeahead({
hint: true,
highlight: true,
minLength: 1
},
{
name: 'MARQUES',
source: marques
});
This should definitely work fine. Let us know if we can help you with anything else or if you find any further issues.