CuppaLabs / angular2-multiselect-dropdown

Angular 2 Dropdown Multiselect
https://cuppalabs.github.io/angular2-multiselect-dropdown
MIT License
298 stars 256 forks source link

i am using multiple multi select. in that case if i am opening multiple drop down.on click of other it is not closing previous one.and also on click of outside drop down is not closing. #315

Open amantarento opened 6 years ago

amantarento commented 6 years ago

@pascal-vogt can you help me how to fix it .

pascal-vogt commented 6 years ago

@amantarento It was working for me in version 2.9.0.

I suggest you start by testing if this older version works for you.

Saddly i don't even have an iPhone at my disposal at the moment. I originaly tested this on the phone of one of my colleagues who's currently on holidays.

amantarento commented 6 years ago

@pascal-vogt i am getting this issue in web not in apple i am using version ^3.2.1. i am using latest chrome version in your component isactive is always true while opeing dropdown. let me know how can i fix this .

pascal-vogt commented 6 years ago

@amantarento I've now updated my project to use version 3.2.1 which is the one you are also using.

I've tested it in Chrome/Firefox/IE/Edge and it's working in all of those browsers for me. I have mutliple instances of the multiselect component as well by the way (some sort of search filter)

One possible cause for your problem could be that you have another component intercepting those click events and possibly stopping propagation. You can read more about the event order here: https://www.quirksmode.org/js/events_order.html

In Chrome you can view the event handlers on the various HTML elements. Press F12, select an element and then have a look at the "Event listeners" tab, this might help you get a better understanding of the issue you are experiencing.

amantarento commented 6 years ago

@pascal-vogt <angular2-multiselect #createBatchModel="ngModel" (onOpen)="onOpen()" [data]="subOrganizations" [(ngModel)]="selectedOrg" [settings]="subOrgDropDownSettings" (onSelect)="fetchMembersDetails($event)" (onDeSelect)="fetchMembersDetails($event)" (onSelectAll)="fetchMembersDetails($event)" (onDeSelectAll)="fetchMembersDetails($event)" (onScrollToEnd)="fetchMembersDetails($event)"> this is the code i am using it . it is inside child component i am suing sematic-ui modal ..

amantarento commented 6 years ago

@pascal-vogt can you tell me how can i use multiple component of angular2-mutiselect .

pascal-vogt commented 6 years ago

@amantarento There is nothing special thing you have to be aware of when using multiple ones, it should just work the same way as when using just one.

You mentioned you are using a modal from the semantic-ui components. I have never used this library but i know this: Usually modal dialogs have to intercept click events outside as well in order to close themselves automatically when you click outside. This might be disabled via an option but the click handler might still be there. Please check with chrome and confirm if there is or isn't a click handler somewhere in the DOM that's stopping the event from being seen by angular2-multiselect component.

balajun01 commented 6 years ago

@amantarento it is not working for me as well, facing same issue.