Skip to content
Discussion options

You must be logged in to vote

The solution on how to do it right, maybe it will be useful to someone.

private async Task TriggerAlertReset()
{

}

var op = new SwalOption()
{
    Category = SwalCategory.Warning,
    Title = Resources.Strings.AppRes.ResourceManager.GetString("_Attention"),
    Content = "Test",
    ShowClose = false,
    IsAutoHide = false,
    ButtonTemplate = new RenderFragment(builder =>
    {
        builder.OpenElement(1, "button");
        builder.AddAttribute(2, "class", "mt-4 btn btn-primary-fix btn-xxl btn-block");
        builder.AddAttribute(3, "onclick", EventCallback.Factory.Create(this, TriggerAlertReset));
        builder.AddContent(4, "Ok");
        builder.CloseElement();
    })
};
Swa…

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
7 replies
@Koreets61
Comment options

@Koreets61
Comment options

@ArgoZhang
Comment options

@Koreets61
Comment options

@Koreets61
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by Koreets61
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants