onTap not working with preventDuplicates
See original GitHub issueFirst I want to thank you for your hard work.
I’ve used toastr with onTap
from ActiveToast
and every time I click on it redirects me to a different page.
this.toastrService.success('message').onTap.subscribe(() => {
this.router.navigateByUrl('/');
});
It’s work great but when I’ve tried to block duplicate messages (preventDuplicates
) I get: ERROR TypeError: Cannot read property 'onTap' of null
.
Thank you!
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
onTap function not working for Align widgets in Flutter
I need to call a function on tap of Align widget but only half the area of GestureDetector is working and on other...
Read more >ngx-toastr - npm
Start using ngx-toastr in your project by running `npm i ngx-toastr`. ... Reset toast timeout on duplicate (preventDuplicates must be true).
Read more >Cut your Cloud Storage TCO by 80% with NetApp ... - CloudPort
More often than not, you end up in a situation where your costs go ... Using native technology called WAFL, ONTAP can prevent...
Read more >Attribute Quick Add - Documentation
Video Guide. Features. Quickly add option values to drop-down and multi-select attributes; Automatically de-duplicates options; Bulk change values ...
Read more >AngularJS 1.4.x and Angular Toastr custom properties not ...
preventDuplicates && map.message === previousToastMessage; var isDuplicateOpen ... onTap: null, positionClass: 'toast-top-right', preventDuplicates: false, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
just check if its null. I think turning on typescript’s strict mode would’ve caught this as well.
Yeah, it looks like if
ToastrService
detects a duplicate message it will return null https://github.com/scttcper/ngx-toastr/blob/5829621f196c23a71a14768a935629e16bc57902/src/lib/toastr/toastr-service.ts#L179-L181