Error using Ajax AutoComplete for jQuery devbridge

0

I am using jquery autocomplete devbridge, I am implementing with an ajax call from angularjs which brings me a Json as follows:

var arrayListAuto =[
   "Mio",
   "Tio",
   "Otro"
 ]

and I call it that with the AutoComplete plugin

$("#autocomplete-linea-principal").autocomplete({
                lookup: arrayListAuto
            });

but when it should show the list of suggestions I get the following error:

  

Uncaught TypeError: Can not read property 'toLowerCase' of undefined

    
asked by user13393 27.08.2016 в 01:20
source

1 answer

0

The autocomplete expects a parameter with the format

var arrayListAuto = [
   { value: 'Mio', data: 'Mio' },
   { value: 'Tio', data: 'Tio' },
   { value: 'Otro', data: 'Otro' }
];
    
answered by 03.03.2017 в 18:18