angular-select2 icon indicating copy to clipboard operation
angular-select2 copied to clipboard

How to use select2 events?

Open piernik opened this issue 10 years ago • 1 comments

How can I use select2 events like `select2-opening and so on

piernik avatar Oct 05 '15 11:10 piernik

Here is solution You could add After:

$timeout(function () {
    element.select2(opts);
    ...
});

Add (if it comes to change event):

if (angular.isFunction(opts.onChange)) {
    element.on("change", function (e) {
        scope.$apply(function () {
            opts.onChange(e);
        });
    });
}

And rest of the events like this.

piernik avatar Oct 05 '15 12:10 piernik