NestedLink
NestedLink copied to clipboard
Validation don't reevaluates when a dependent state changes
Hi there!
I have a validation for a link that uses a different state property (not the one associated to the link I'm validating). When that external state property changes, the validation doesn't rerun. This leaves the link error property in a not trustworthy state. The external state property may leave the link with an error but I won't know until the state associated with the link changes.
A workaround for this would be having a mechanism to run validation on a link manually, but I couldn't find a way to do so. Any other suggestions?
Thanks in advance!
Hi. Links are meant to be immutable and to be recreated again in render(). That applies to validation as well.
It would be very helpful if you provide the code example. Looking at the example I could say something less general.