fabiomcosta / mootools-meio-autocomplete

A complete mootools Autocomplete plugin
http://www.meiocodigo.com/projects/meio-autocomplete/
32 stars 14 forks source link

Feature Request: Hook for Request #2

Closed ianjosephwilson closed 14 years ago

ianjosephwilson commented 14 years ago

It would be nice to be able to run the response from a request generated by Meio.Autocomplete.Request through a user defined function before using it in Meio.Autocomplete. This is necessary if the server returns the results in an envelope such as:

{'results': autocompleteEntries}

The user would define a function as simple as this:

requestOptions: {
    'formatResponse': function(response) { return response.results; },
}

This of course would be used only by Meio.Autocomplete.Request and not by Request.JSON.

fabiomcosta commented 14 years ago

Yes, as i said i loved the idea. Will be updating it today. Thanks again.

ianjosephwilson commented 14 years ago

I'm using the updated code now, thanks.