Here we are only making the model invalid, there is no logic to make it valid again.
If there are multiple model errors in the list, and if user changes any of them, it used to clear every other invalid models in the list. To avoid this to happen, only invalid models are highlighted, rest others are taken care of by the child valid events running in parallel.
This is causing issues when we have a nested collection control (ie: Subnode control under Subnode control), the error model is not getting cleared in that case because we do not have logic to make it valid here in settimeout, so the save button in the parent model is not getting enabled.
What is the reason for adding delay setTimeout(<func>, 120)?
This is causing issues in automation testing and makes buttons enable/disable with slight delay.
Timeout was added for the reason that, even if the current changed model is valid, it should also check the rest of the invalid models in the list. Slight delay was added, so even if the current model becomes valid, it should highlight the invalid one iterating over the inner model list.
This is causing issue in automation tests because it introduced delay in the buttons enable/disable state in the parent collection.