Open duikb00t opened 7 years ago
I think you may need to define the display
function for your dataset:
$("input").typeahead({ /*hint:, highlight:, etc. */ }, {
source: engine.ttAdapter(),
display: function (obj) {
// Return your desired string
}
});
First of all: The dropdown and AJAX call is all working fine. Thanks Typeahead.js.
Issue When I select an item from my dropdown, the full JSON object is being parsed in the textfield/searchfield.
My data is returned from PHP like: return response()->json($clients);
What am I doing wrong? Do I have to attach somewhere a json.parse?