Hi, I have an alert controller which has some checkboxes, but the handler takes too long to finish.
What I want is to click the checkbox and that the handler is handled asynchronously, meaning that I don’t have to wait for it to finish. Adding async
didn’t work.
My code for this is:
this.listaVideosAux.forEach(lista => {
alert.addInput({
type: 'checkbox',
label: lista.nombre,
value: lista.nombre,
checked: true,
handler: async checkBox => {
if (checkBox.checked) {
this.categoriasFiltro.push(checkBox.value)
} else {
this.categoriasFiltro = this.categoriasFiltro.filter(categoria => categoria != checkBox.value)
}
this.filtrar();
}
});
});
Thanks