javascript - Selectize load function is not triggered on typing -


i have following selectize element:

$('#my_selectize').selectize({             valuefield: 'value',             labelfield: 'text',             options: [{'value':1,'text':'abc','inn':123}],             render: {             option: function(data, escape)              {                 //return ....             },             load: function(query, callback)             {                 if (!query.length) // breakpoint not triggered                     return callback();                  $.ajax({                     url: '{% url my_url %}',                     type: 'get',                     data: {q: query},                     error: function() { callback(); },                     success: function(res) {                         callback(json.parse(vendor_options_json.f));                     }                 });             }         }}); 

according docs, once user starts typing, should see browser stop @ breakpoint put on commented line if-condition (if (!query.length)). doesn't happen. there misunderstood it? far understand, load-method responsible fetching server-side options match user typing.


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -