Hi Pieterjan,
Your reported issue can be resolved by passing the ToastModel with the ShowAsync method of Toast control.
Code snippet:
ToastComponent.razor
protected override void OnInitialized() { ToastService.ShowToastTrigger += (ToastOption options) => { InvokeAsync(() => { this.Toast.ShowAsync(new ToastModel() { Title = options.Title, Content = options.Content });
}); }; } |
Please find the attached sample for your reference.
Best Regards,
Vinothkumar
If this post is helpful, please consider Accepting it as the solution so that other members can locate it more quickly.
Attachment:
Blazor_ffe3c56a.zip