Toasts not closed with button


Topic: Toasts not closed with button

Tobias pro premium asked 3 years ago

I'm on Angular MDB5 1.0.0-beta5 and I'm following the examples here:

https://mdbootstrap.com/docs/b5/angular/components/toasts/#docsTabsOverview

Nothing is happening when I press the close button tough.

If I add a click event to the button and call this.notificationRef.close(), it will work (takes two clicks though). But I assume this should work without it?


MonizDave premium priority commented 3 years ago

I'm experiencing the similar problem, but mine doesn't take 2 clicks. Something else I noticed though is if you have it set up for stacking and you open a few, then close them all. You can't open anymore due to: Cannot read property 'getBoundingClientRect' of null


Arkadiusz Idzikowski staff commented 3 years ago

@Tobias Using notificationRef.close() on button click is a correct approach. We will add this information to the examples in the documentation. We also couldn't reproduce the problem with the double click, can you provide more information about the code/configuration you used?

@MonizDave We are already aware of the problems with stacking toasts and we are working on the fix.


Tobias pro premium commented 3 years ago

@MonizDave ok, just a miss in the documentation then, thanks for clarifying. As for code I use the example from the documentation. As I updated to the latest beta I can no longer reproduce the issue myself, so it's actually not a problem anymore.


MonizDave premium priority commented 3 years ago

@Arkadiusz Idzikowski Thanks for letting me know, looking forward to the fix.

@Tobias good luck, hope you find out why you need a double click


MonizDave premium priority commented 3 years ago

@Arkadiusz Idzikowski How will I know when a solution is available?


Arkadiusz Idzikowski staff commented 3 years ago

@MonizDave The best way to stay up to date is to check our changelog: https://mdbootstrap.com/docs/b5/angular/getting-started/changelog/ (you can join our mailing list to receive information about new releases).

We also always try to update the thread related to a particular problem.


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue
  • User: Pro
  • Premium support: Yes
  • Technology: MDB Angular
  • MDB Version: MDB5 1.0.0-beta5
  • Device: any
  • Browser: any
  • OS: any
  • Provided sample code: No
  • Provided link: Yes
Tags