0👍
It was realized with the following code.
$('.select-company').chosen({
width: width,
}).change(function(ev, result) {
if (result.selected !== 'target value') {
return;
}
let val = $('.my-selector').val();
for (let i = 0; i < val.length; ++i) {
if (val[i] === result.selected) {
val.splice(i, 1);
--i;
}
}
$('.my-selector').val(val);
$('.my-selector').trigger('chosen:updated');
});
Source:stackexchange.com