Toast
Toast copied to clipboard
[Question] is there something like a global Toast.OnShowComponent event?
I had kind of taken a guess that if I went into the mainlayout where I have:
<BlazoredToasts Position="ToastPosition.BottomRight" MaxToastCount="3" Timeout="10" IconType="IconType.FontAwesome" SuccessClass="success-toast-override" SuccessIcon="fa fa-thumbs-up" />
and added something like the following to the code behind:
protected override void OnAfterRender(bool firstRender)
{ Toast.OnShowComponent += Toast_OnShowComponent; }
that the Toast_OnShowComponent would get called by any toast on any page.
I think I understand now why that is wrong, but it does work for toasts issued from that page.
Is there a way to do this that I am missing?