VueJS Select2 directive doesn’t fire @change event

As the title suggests, I’ve implemented the Select2 directive for VueJS 1.0.15 following the example provided on their page. However, I’m unable to capture the @change event.

Fix

var selectDropDown = $(".select-drop-down").select2();

selectDropDown.on('select2:select', function (e) {
    var event = new Event('change');
    e.target.dispatchEvent(event);
});

Leave a Comment