You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, as stipulated in the first paragraph, if the server controller is modified to return only responses based on the sent query(wildcard) the suggestions appear as they are meant to.
The text was updated successfully, but these errors were encountered:
The below code will not work if the server doesn't filter responses based on the QUERY. If remote is replaced by prefetch, it will work fine.
`var customers = new Bloodhound({
datumTokenizer: Bloodhound.tokenizers.obj.whitespace('name'),
queryTokenizer: Bloodhound.tokenizers.whitespace,
remote: {
url: '/api/customers?query=%QUERY',
wildcard: '%QUERY'
}
});
The AJAX request is sent and received properly for example like below:
[
{
"id": 4,
"name": "Arnie Sch",
"isSubscribedToNewsletter": true,
"membershipTypeId": 1,
"membershipType": {
"id": 1,
"name": "first"
},
"birthdate": null
},
{
"id": 5,
"name": "Sly Stallone",
"isSubscribedToNewsletter": true,
"membershipTypeId": 1,
"membershipType": {
"id": 1,
"name": "first"
},
"birthdate": null
},
{
"id": 6,
"name": "Hugo Weaving",
"isSubscribedToNewsletter": true,
"membershipTypeId": 1,
"membershipType": {
"id": 1,
"name": "first"
},
"birthdate": null
},
{
"id": 7,
"name": "Natalie Portman",
"isSubscribedToNewsletter": true,
"membershipTypeId": 2,
"membershipType": {
"id": 2,
"name": "second"
},
"birthdate": "1995-05-05T00:00:00"
},
{
"id": 9,
"name": "Jason Statham",
"isSubscribedToNewsletter": true,
"membershipTypeId": 2,
"membershipType": {
"id": 2,
"name": "second"
},
"birthdate": "2000-01-01T00:00:00"
}
]
But the script does not yield any suggestions:
However, as stipulated in the first paragraph, if the server controller is modified to return only responses based on the sent query(wildcard) the suggestions appear as they are meant to.
The text was updated successfully, but these errors were encountered: