Ng2-select: Click Event

Created on 29 Dec 2016  路  3Comments  路  Source: valor-software/ng2-select

Hi,
I am using ng2-select and its working very fine. But the thing is I need to use click event. How can I use that. Before Selected event I want to fire Click event. Please help me in this way.
Thanks

Most helpful comment

That said, it'd be pretty nice if this library could simply emit a custom click event. :)

All 3 comments

@Hasnain-Bukhari you can use the (mousedown) event, the problem with (click) is that it requires both (mousedown) and (mouseup) and (mouseup) never has the chance to fire since the element being clicked is replaced on (mousedown).

I'm using (mousedown) to track whether or not the select has been opened, and https://www.npmjs.com/package/angular2-click-outside to tell when it's been closed (referring back to (mousedown) so that I don't get false positives on the close.

That said, it'd be pretty nice if this library could simply emit a custom click event. :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

253936563 picture 253936563  路  5Comments

Cadenei picture Cadenei  路  4Comments

TheBurgerShot picture TheBurgerShot  路  4Comments

Matiszak picture Matiszak  路  6Comments

carstenschaefer picture carstenschaefer  路  5Comments