You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to "clear" select field after an option is selected, by selecting another option right after it (with empty value in this case), results in onChange event running twice in Firefox (only). Same with selecting any option not just empty one. It works as expected in Chrome, Edge & Safari, where it runs only once. Version 0.15.2
$(document).ready(function()
{
var $select = $('#client').selectize({
create: false,
sortField: 'text',
preload: true,
openOnFocus: true,
valueField: 'id',
labelField: 'text',
allowEmptyOption: true,
showEmptyOptionInDropdow: true,
onChange: function(id) {
// this runs twice in Firefox
console.log('Selectize value changed to: ' + id);
$select[0].selectize.setValue('', true); // select another option
},
});
var selectize = $select[0].selectize;
});
The text was updated successfully, but these errors were encountered:
Trying to "clear" select field after an option is selected, by selecting another option right after it (with empty value in this case), results in onChange event running twice in Firefox (only). Same with selecting any option not just empty one. It works as expected in Chrome, Edge & Safari, where it runs only once. Version 0.15.2
The text was updated successfully, but these errors were encountered: