react-form-builder icon indicating copy to clipboard operation
react-form-builder copied to clipboard

dynamically change the answer data

Open ajay1800spirits opened this issue 1 year ago • 0 comments

How to dynamically change the answer_data? As in I built a form and I want to update certain inputs based on other inputs and using the onChange prop in the reactFormGenerator component update the answer_data's value using a state variable. And while my state variable is updated correctly the answer_data is not changing. My option currently is to force re-render the form and using the key prop in reactFormGenerator and have its value change for everytime onChange is called forcing a re-render. Is there a cleaner way to dynamically change the answer_data in the form?

ajay1800spirits avatar Feb 27 '24 06:02 ajay1800spirits