jquery selector in angular10 is hitting 'select2:unselecting' on dropdown select

32 Views Asked by At

We have a single select dropdown in angular 10 application, where the first single select is firing the 'select2:unselecting' event, which is incorrect.

$(el.nativeElement).select2({
      data: this.data: [],
      matcher: matcher
    }).on('change', (e: Event) => {
      ...
      ...
    }).on('select2:unselecting', (e: Event) => {
      ...
      ...
    }
    });

Any idea why unselect event is getting fired?

0

There are 0 best solutions below