I have a form with a dropdown. Based on what gets chosen in the dropdown, multiple fields in the form should get changed. Code:
https://stackblitz.com/edit/react-ts-m3qyz2?file=index.tsx
This works perfectly but the code is quite messy (see lines 93 - 115). I would prefer to call the onChange handler external like in the lines I have commented out (onDataTypeChange). But this doesn't work because there I don't have access to the formRenderProps.onChange method. How could I achive this?