Selectize.js: How ro refresh the selectize dropdown options when the options in the corresponding <select> are refreshed

Created on 4 Mar 2014  路  3Comments  路  Source: selectize/selectize.js

Simple question: how to refresh the selectize options, so that they reflect the updated options in the corresponding select?

question

Most helpful comment

var mySelectize = $('#mySelect').selectize(
{
 load: function (query, callback) {
                this.clearOptions();        // clear the data
                this.renderCache = {};      // clear the html template cache
                ...
});


function refreshSelectize()
{
    var selectizeObj = mySelectize[0].selectize;
    selectizeObj.onSearchChange('uniqueSearchQueryOrElseCacheWillBeUsed');
}

All 3 comments

wondering this as well. have you found a solution?

var mySelectize = $('#mySelect').selectize(
{
 load: function (query, callback) {
                this.clearOptions();        // clear the data
                this.renderCache = {};      // clear the html template cache
                ...
});


function refreshSelectize()
{
    var selectizeObj = mySelectize[0].selectize;
    selectizeObj.onSearchChange('uniqueSearchQueryOrElseCacheWillBeUsed');
}

thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aureole82 picture aureole82  路  3Comments

Samsinite picture Samsinite  路  6Comments

John-Fratila picture John-Fratila  路  4Comments

stevelacey picture stevelacey  路  4Comments

FilipeVoges picture FilipeVoges  路  6Comments