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
Hi, Thanks for creating this widget - it's really useful.
I've been trying to use multisearch with ajax to get the source list of searchable items from a database, but I cannot figure out how to create pass that list back to the source. This is my code:
$("#item-search").multisearch({
source: function (term, callback) {
$.ajax({
type: 'POST',
url: url,
data: {term:term},
})
.done(function(data) {
//console.log(data) -> ["item1","item2", "item3", "etc"]
callback(data); //similar to how you do it in line 180 here: bseth99.github.io/jquery-ui-multisearch/examples/movies.html
})
});
Currently the picker shows 5 "undefined"s regardless of how many results are returned.
Let me know if there's something I'm missing. Thanks!
The text was updated successfully, but these errors were encountered:
Try passing an array of hashes - { id: 1, name: 'item1' }. id can be the same as name. This can all be overridden, but the default behavior expects that format.
Hi, Thanks for creating this widget - it's really useful.
I've been trying to use multisearch with ajax to get the source list of searchable items from a database, but I cannot figure out how to create pass that list back to the source. This is my code:
Currently the picker shows 5 "undefined"s regardless of how many results are returned.
Let me know if there's something I'm missing. Thanks!
The text was updated successfully, but these errors were encountered: