Blazored / Toast

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

[Bug] Regression ? #183

Closed boukenka closed 1 year ago

boukenka commented 1 year ago

In the version 3.2.2, the following code is working :

ToastService.ShowError(message, "Error");

It calls the following method:

public void ShowError(string message, string heading = "", Action? onClick = null)
{
    ShowToast(ToastLevel.Error, message, heading, onClick);
 }

But for version 4.0.0, the code is no more working because the method has been changed :

public void ShowError(string message, Action<ToastSettings>? settings = null)
{
   ShowToast(ToastLevel.Error, message, settings);
}

Is this on purpose? I have to change my code in many places. Thanks for any feedback.

chrissainty commented 1 year ago

Hi @boukenka,

Yes, this is on purpose. That why the major version number was increased, it indicate a breaking change.