Blazored / Toast

A JavaScript free toast library for Blazor and Razor Component applications
https://blazored.github.io/Toast/
MIT License
662 stars 92 forks source link

How do I use MaxToastCount? #252

Open ShawnDoe opened 7 months ago

ShawnDoe commented 7 months ago

There was a discussion added #186

"I have created my own toast component and I cannot really get it to work with the setting for maximum amount of toasts. If I use the standard methods for popping up toasts, it works. But not when I have created my own."

asking about this but it was never commented upon. I have the same issue. Can this be added to a new release?

chrissainty commented 7 months ago

Thanks for re-raising this @ShawnDoe. The issue is that this check https://github.com/Blazored/Toast/blob/21a1fa5a898f6558cef9fe9b90b052e0131d3dcd/src/Blazored.Toast/BlazoredToasts.razor.cs#L114

and the resulting logic, doesn't exist in the ShowCustomToast method. This method would need to be updated to incorporate the same check. Happy to take a PR for this if you want to give it a go?