0
votes

I am using this multi-select dropdown (https://www.npmjs.com/package/ng-multiselect-dropdown) to achieve multi-selection in my angular project. The strange issue i am facing is that in its demo and in my stackblitz demo( https://stackblitz.com/edit/angular-5wcm6z?file=src%2Fapp%2Fapp.component.html), it closes when i click outside. (display: none) gets applied dynamically. But when i am using the same component in my actualy project, the click event outside doesn't work and i have to click on the dropdown again to close it.

This is how i am using this dropdown.

<div class="col-md-5">
    <label>Select Providers</label>
    <ng-multiselect-dropdown
      #dropdown
      [settings]="dropdownSettings"
      [data]="providers"
      [(ngModel)]="selectedItems"
      name="onlyBillerProviders"
      (onDropDownClose)="onDropdownClose(selectedItems)"
    >
    </ng-multiselect-dropdown>
1

1 Answers

0
votes

The package you use is different from the stackblitz demo you show.

Package: ng-multiselect-dropdown

Demo Package: angular2-multiselect