/// <summary> /// Closes the currently open SweetAlert2 modal programmatically. /// </summary> /// <param name="onComplete">An optional callback to be called when the alert has finished closing.</param> public void Close(SweetAlertCallback onComplete) { var requestId = Guid.NewGuid(); OnCompleteCallbacks.Add(requestId, onComplete); jSInProcessRuntime.Invoke <object>("CurrieTechnologies.Blazor.SweetAlert2.Close", requestId); }
/// <summary> /// Closes the currently open SweetAlert2 modal programmatically. /// </summary> /// <param name="onComplete">An optional callback to be called when the alert has finished closing.</param> public async Task CloseAsync(SweetAlertCallback onComplete) { var requestId = Guid.NewGuid(); OnCompleteCallbacks.Add(requestId, onComplete); await jSRuntime.InvokeAsync <object>("CurrieTechnologies.Blazor.SweetAlert2.Close", requestId); }
/// <summary> /// Closes the currently open SweetAlert2 modal programmatically. /// </summary> /// <param name="onComplete">An optional callback to be called when the alert has finished closing.</param> public Task CloseAsync(SweetAlertCallback onComplete) { return(this.swal.CloseAsync(onComplete)); }
/// <summary> /// Closes the currently open SweetAlert2 modal programmatically. /// </summary> /// <param name="onComplete">An optional callback to be called when the alert has finished closing.</param> public void Close(SweetAlertCallback onComplete) { this.swal.Close(onComplete); }