maxisam / ngx-clipboard

A pure angular clipboard directive
http://maxisam.github.io/ngx-clipboard/
MIT License
505 stars 93 forks source link

cbOnSuccess is not working #310

Open lprada opened 2 years ago

lprada commented 2 years ago

I cannot get the callback method to work. I am calling a method to do something but is never call, any ideas?

binohnir commented 1 year ago

me too

TheGauntt commented 1 year ago

Also seeing this issue

"ngx-clipboard": "^15.1.0",

Worked in the past (years ago with lower version) - not sure at what point it broke

ppattard commented 11 months ago

Hello,

I noticed the same and after a bit of digging I found that this is due to this commit: https://github.com/maxisam/ngx-clipboard/commit/6f3aae4b7d1c066f8ab82a174c38b2f8219868a9 that changed the detection of the observer using the new observed property of rxjs' Subject.

This property is available only in rxjs>=7, so you just need to bump the version of rxjs.

My 2 cents.

maxisam commented 9 months ago

@ppattard Thanks for digging to this issue. Do you think I should add rxjs >= 7 in https://github.com/maxisam/ngx-clipboard/blob/400d8890eb36509df2a19584b10a1a599704f38e/projects/ngx-clipboard/package.json#L31 ?