I want to hook an event in my select2 once it gets cleared. The select2 was initalized with allowClear: true
. Yet the event
$select.on('select2-removed', function(event) {
console.log(event);
});
does not trigger when resetting the select2 with the clear button.
unselecting
fires before selection is removed,unselect
whenever it is removed. – Bullivant