hernantz / doubleSuggest

Facebook like jquery search suggestion plugin that searches in local and remote data sources.
65 stars 7 forks source link

beforeRetrieve is broken? #7

Closed JohnMcLear closed 12 years ago

JohnMcLear commented 12 years ago
beforeRetrieve: function(queryString){
  console.log("foo");
},

throws an error?

RTFM'd...

beforeRetrieve: function(queryString){ return string; } Custom function that is run before the AJAX request is made, or the local object is searched. You need to return a string. queryString: the current text entered in the input.

Fixed by doing

beforeRetrieve: function(queryString){
//  console.log("foo"); my stuff here..
  return queryString;
},