bootstrap-select
bootstrap-select copied to clipboard
Programmatically toggle options for multiple select to trigger changed.bs.select
For multiple selection case, it'd be nice to be able to programmatically toggle options so that it triggers changed.bs.select with the flipped/toggled index available to be used with changed.bs.select.
For example:
.select.selectpicker('toggle', 'option');
And then:
.select.on('changed.bs.select', function (e, clickedIndex, isSelected, previousValue) {
// clickedIndex is available with the toggle option index
...
}
It seems like toggle currently means toggling the UI, so a different function name might be needed (e.g. switch)
Or is there a streamlined way to implement this with the existing functionalities?