Changing cells based on state of another cell - TanStack