2
0
mirror of https://github.com/devbridge/jQuery-Autocomplete.git synced 2024-11-25 14:17:45 +00:00

Merge pull request #62 from gedbac/master

Method 'clear' was added
This commit is contained in:
Tomas Kirda 2013-04-09 08:08:20 -07:00
commit 97e421cf95
2 changed files with 8 additions and 2 deletions

View File

@ -29,7 +29,7 @@ The standard jquery.autocomplete.js file is around 2.7KB when minified via Closu
Useful when for example you need to fill list of coma separated values.
* `zIndex`: 'z-index' for suggestions container. Default: `9999`.
* `type`: Ajax request type to get suggestions. Default: `GET`.
* `noCache`: Boolean value indicating whether to cache suggestion results. Default `true`.
* `noCache`: Boolean value indicating whether to cache suggestion results. Default `false`.
* `onSearchStart`: `function (query) {}` called before ajax request. `this` is bound to input element.
* `onSearchComplete`: `function (query) {}` called after ajax response is processed. `this` is bound to input element.
* `tabDisabled`: Default `false`. Set to true to leave the cursor in the input field after the user tabs to select a suggestion.

View File

@ -226,6 +226,12 @@
this.badQueries = [];
},
clear: function () {
this.clearCache();
this.currentValue = null;
this.suggestions = [];
},
disable: function () {
this.disabled = true;
},
@ -632,4 +638,4 @@
}
});
};
}));
}));