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

244
Views
¿Cómo se puede resolver el error en Sweetalert con Blazorise?

Necesito ayuda con esto, trato de usar sweetalert2 con la eliminación del componente blazorise, quiero confirmar antes de eliminar un registro, pero recibo un error y no me detengo en el método esperado, y no sé cómo resolverlo... use .net core 6 y blazorise 0.9.5.3

Error: 'Se produjo una excepción al ejecutar la interoperabilidad JS: el valor JSON no se pudo convertir a System.Boolean. Ruta: $ | Número de línea: 0 | BytePositionInLine: 4.. Consulte InnerException para obtener más detalles.'

mi código

 [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 (Código de 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!