AfterValidate order

Tags: #<Tag:0x00007efc7283f2c8> #<Tag:0x00007efc7283f188>

Good day to you!
My question is why order of log is complete1 complete2 complete0

Am i wrong, thinking what validate should return value before AfterValidate hook?
By the way, why results are not equals? in afterValidate i get true, but in validate false, with same table(nothing changes)

Hi @nikoches

In Handsontable validation can be asynchronous (like in your case, function accepts two arguments ( value , callback )). To give a bit more insight, I would need to know what are those subject methods and if they use any timeouts or premises.

https://rxjs-dev.firebaseapp.com/api/index/class/AsyncSubject

That Asyncsubject not using any timeouts or promises, as far as I know

It seems that there is a similar issue already on the forum at ValidateCells doesn't work with angular Subject and matDialog as expected (might be your colleague from the team?).

Nevertheless, if there is no asynchronicity added in between the logs (as my colleague mentioned at ValidateCells doesn't work with angular Subject and matDialog as expected), we’d need to ask for a demo to replicate the mentioned behavior. Here https://jsfiddle.net/3exucv9a/ we have a demo that calls two logs within the afterValidate hook on a validateRows() call and the logs are printed in the “correct” order.