mirror of
https://github.com/rstudio/shiny.git
synced 2026-02-15 17:15:12 -05:00
fixes #814: load options after initialization of selectize in the server mode
This commit is contained in:
@@ -56,7 +56,6 @@ $.extend(selectInputBinding, {
|
||||
selectize = this._selectize(el);
|
||||
selectize.clearOptions();
|
||||
selectize.settings.load = function(query, callback) {
|
||||
if (!query.length) return callback();
|
||||
var settings = selectize.settings;
|
||||
$.ajax({
|
||||
url: data.url,
|
||||
@@ -75,6 +74,10 @@ $.extend(selectInputBinding, {
|
||||
}
|
||||
});
|
||||
};
|
||||
// perform an empty search after changing the `load` function
|
||||
selectize.load(function(callback) {
|
||||
selectize.settings.load.apply(selectize, ['', callback]);
|
||||
});
|
||||
if (data.hasOwnProperty('selected'))
|
||||
selectize.addOption(data.selected);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user