ng2-select icon indicating copy to clipboard operation
ng2-select copied to clipboard

Multi-select OnBlur not working

Open rkralston opened this issue 8 years ago • 9 comments

The OnBlur event for Multi-Select does not close the selection box.

rkralston avatar Jun 29 '16 15:06 rkralston

I'm trying to write a workaround for this, but having no luck. Any ideas?

rkralston avatar Jun 30 '16 18:06 rkralston

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.

rkralston avatar Jun 30 '16 18:06 rkralston

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.

rkralston avatar Jun 30 '16 18:06 rkralston

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

lutsykigor avatar Aug 12 '16 08:08 lutsykigor

Added pull request to support blur event, if anyone needed: [https://github.com/valor-software/ng2-select/pull/350]

lutsykigor avatar Aug 12 '16 09:08 lutsykigor

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.

rkralston avatar Aug 12 '16 15:08 rkralston

+1

FloRest avatar Aug 18 '16 10:08 FloRest

#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.

shane-lamb avatar Nov 04 '16 12:11 shane-lamb

The problem still exists in prime ng 5.2.6. onBlur is never emitted.

broweratcognitecdotcom avatar Aug 24 '18 07:08 broweratcognitecdotcom