biggora / bootstrap-ajax-typeahead

Twitter Bootstrap Ajax Typeahead Plugin
http://plugins.upbootstrap.com/bootstrap-ajax-typeahead/
MIT License
172 stars 117 forks source link

nothing happens after server call (server side return is good) #52

Open ftriss opened 7 years ago

ftriss commented 7 years ago

Hi,

I try to use ajax typeahead with an ajax call.

Here's the code : ajax: { url: "/myurl", triggerLength: 1, method: "post" }

I can catch the event on the server side (so the call is working), I return this (as a test) : return "[{ id: 1, name: 'John'}, { id: 2, name: 'Alex'}, { id: 3, name: 'Terry'}]";

But nothing happens.

I try to use "preProcess" option, but the function is never call.

Any idea ?

Thanks

yokidokii commented 7 years ago

I had the same issue, but when I added 'displayField' the data now shows.