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

added afterRender callback

This commit is contained in:
Florijan Hamzic 2015-09-03 14:49:26 +02:00
parent 2c8058a15e
commit dd3b9558bb

View File

@ -643,6 +643,7 @@
container = $(that.suggestionsContainer),
noSuggestionsContainer = $(that.noSuggestionsContainer),
beforeRender = options.beforeRender,
afterRender = options.afterRender,
html = '',
category,
formatGroup = function (suggestion, index) {
@ -683,6 +684,10 @@
that.fixPosition();
container.show();
if ($.isFunction(afterRender)) {
afterRender.call(that.element, container);
}
// Select first value by default:
if (options.autoSelectFirst) {
that.selectedIndex = 0;