Using enableClickableOptGroups: true
on a multiple select works fine. But clicking an optgroup-label will not trigger an "change" event on the select.
So the value(s) of the <select>
changes but no event listener will detect this change.
Demo of this issue on https://jsfiddle.net/85pbc12a/1/
I created a very quick and dirty fix:
$('.multiselect-group-clickable').bind('click', function() {
// not the best way to find the select...
$(this).parentsUntil('.btn-group').parent().parent().find('select').trigger('change');
}
Demo "fixed" version: https://jsfiddle.net/36jw8cdm/1/
Maybe this would be just a small change, but no time currently to test this.
Just include this line: $(element).trigger('change');
in updateOptGroups
Check out the pull request #813
I too have this exact problem.
Will have a look at the PR, this should get fixed.
Merged #813.