ng2-select
ng2-select copied to clipboard
Multi-select OnBlur not working
The OnBlur event for Multi-Select does not close the selection box.
I'm trying to write a workaround for this, but having no luck. Any ideas?
For Multi-Selects, I am manually initializing the objects with data. I am manually updating their CSS on and changes. I am manually syncing the data with my model.
My only outstanding issue is clicking off the dropdown does not close the window for multi-selects.
If anyone has a workaround, I can deploy this.
I would modify the component itself, but I'm a bit of an angular2 noob and I don't exactly know how to build the object and don't have time to learn. I really need to deploy this.
Hey, experiencing exactly the same issue, did you have any luck to get some workaround?
If I am using blur event handler, it is not extracting onBlur from ng-2 typeahead, and it is not possible to subscribe to blur event, at all.
<ng-select *ngIf="ready" [initData]="choosen" [items]="options" (data)="dataRefreshed($event)" (blur)="onBlur()" [multiple]="true" [placeholder]="placeholder" class="one"></ng-select>
onBlur is not getting fired, will try to fix and send merge request
Added pull request to support blur event, if anyone needed: [https://github.com/valor-software/ng2-select/pull/350]
I have a fully working example running with RC4 at https://accounts.nrmnet.net.
You'll need to sign up for the service to get to the form. Or you can just look at the main.js. It isn't pretty, but it works.
I will include your PR into what I am working on.
+1
#499 See the proposed solution in this link, it should fix the issue here as well. There is a pull request waiting to be merged.
The problem still exists in prime ng 5.2.6. onBlur is never emitted.