Hi,
I want to wait the calling method until callback method is finished when i call validateCells
any solution for this??
Hi,
I want to wait the calling method until callback method is finished when i call validateCells
any solution for this??
Hi @surya.pasem
Did you try the afterValidate
hook? This hook is fired when all the validation is finished. Here’s a reference https://handsontable.com/docs/javascript-data-grid/api/hooks/#aftervalidate
Hi aleksandra,
Please find my exact requirement in below example
async getMasterDataFromHandsonTable() {
var result="";
this.hot.validateCells((valid) => {
if(valid){
result=“Success”;
}else {
result=“Failed”;
}
});
console.log(“Please wait until validateCells to finish its job”);
return result;
}
I should return Success/Failed but empty string is returning as callback function taking time.
Please suggest me how can I achieve this.
Sorry for the delay @surya.pasem. I have missed the notification for this thread.
I guess that you might have already solve the case (the validation itself runs asynchronously so that’s why we recommend the afterValidate
hook. If there’s anything left to work on please let me know.