bootstrap-ajax-typeahead
bootstrap-ajax-typeahead copied to clipboard
displayField not working
Hi,
Your plugin is awesome but I've faced some error in "displayField" option, this is not working properly. I've used this code in two separate files, suppose file A & B.
Code of file A:
ajax: { url: '/customer/search', method: 'post', triggerLength: 3, displayField: "name", valueField: "id",}
Response from server:
{"error":false,"status":true,"message":"Data Found","data":[{"id":312,"name":"Testing Name"}]}
This is working fine, typeahead working properly.
Code of File B:
ajax: { url: '/customer/search', method: 'post', triggerLength: 3, displayField: "name", valueField: "id",}
Response from server:
{"error":false,"status":true,"message":"Data Found","data":[{"id":312,"name":"Testing Name","key":"SomeNoInThisField"}]}
In second code i.e. in file B, typehaed not working, there is no error in the console, can anyone help me in this case. I've a data set like demo3 but data some from remote server.