Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

251
Views
How can resolve Error in Sweetalert with Blazorise

i need some help with this , i try to use sweetalert2 with blazorise component delete , i want confirm before to delete a record, but i recive error , and dont stop on method awaited , and i dont know how to resolve .... i use .net core 6 , and blazorise 0.9.5.3

Error : 'An exception occurred executing JS interop: The JSON value could not be converted to System.Boolean. Path: $ | LineNumber: 0 | BytePositionInLine: 4.. See InnerException for more details.'

my code

    [Inject] IJSRuntime js { get; set; }

    private async Task OnRowRemoved(UsuarioArea usuarioArea)
    {
        bool confirmacion = false; 
        confirmacion = await js.InvokeAsync<bool>("customConfirm","Desasignar area","¿Quiere desasignar estar area?","question");
        if (confirmacion) 
        {
            Console.WriteLine("Si");
        }else{
            Console.WriteLine("No");
        }
  }

JS (Code From Felipe Gavilan, Youtuber)

function customConfirm(title, text, type) {
    return new Promise(resolve => {
        Swal.fire({
            title,
            text,
            type,
            showCancelButton: true,
            confirmButtonColor: '#3085d6',
            cancelButtonColor: '#d33',
            confirmButtonText: 'Si, Eliminar'
        }).then((result) => {
            resolve(result.isConfirmed);
        })
    });
}

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!