Open notflip opened 6 years ago
I'm getting the following result when using multiple sources (and bloodhound). Is there anyway I can get it to the top? So that the results are not sorted by group but by biggest hit?
This is my current code.
$(".global-search input").typeahead({ hint: true, highlight: true, minLength: 2, maxItem: 30, dynamic: true, }, { source: suppliersEngine.ttAdapter(), name: 'suppliers', templates: { suggestion: function (data) { return '<a class="list-group-item" href="#"><span class="name">'+ data.name + '</span> <small class="pull-right">Suppliers</small></a>'; } } }, { source: recipesEngine.ttAdapter(), name: 'recipes', templates: { suggestion: function (data) { return '<a class="list-group-item" href="#"><span class="name">'+ data.name + '</span> <small class="pull-right">Recipes</small></a>'; } } }, { source: preparationsEngine.ttAdapter(), name: 'preparations', templates: { suggestion: function (data) { return '<a class="list-group-item" href="#"><span class="name">'+ data.name + '</span> <small class="pull-right">Preparations</small></a>'; } } });
Any help would be greatly appreciated!
+1
I'm getting the following result when using multiple sources (and bloodhound). Is there anyway I can get it to the top? So that the results are not sorted by group but by biggest hit?
This is my current code.
Any help would be greatly appreciated!