mirror of
https://github.com/devbridge/jQuery-Autocomplete.git
synced 2024-11-09 23:01:00 +00:00
add the ajaxSetter option
provide a way to rearange the settings of the ajax request just before sending the request.
This commit is contained in:
parent
017965bddd
commit
f7e87a0979
@ -56,6 +56,7 @@
|
||||
that = this,
|
||||
defaults = {
|
||||
ajaxSettings: {},
|
||||
ajaxSetter: null,
|
||||
autoSelectFirst: false,
|
||||
appendTo: document.body,
|
||||
serviceUrl: null,
|
||||
@ -594,6 +595,9 @@
|
||||
|
||||
$.extend(ajaxSettings, options.ajaxSettings);
|
||||
|
||||
$.isFunction(options.ajaxSetter) &&
|
||||
options.ajaxSetter(q, ajaxSettings)
|
||||
|
||||
that.currentRequest = $.ajax(ajaxSettings).done(function (data) {
|
||||
var result;
|
||||
that.currentRequest = null;
|
||||
|
Loading…
Reference in New Issue
Block a user