Change value of a field based on another field - TanStack