0

How to reset a textbox when another dropdown field is changed in redux-form?
I tried using dispatch(change()) syntax but I keep getting the following error:

redux-form/lib/change could not be resolved

1 Answer 1

0

Finally found solution for above problem. The

redux-form/lib/change could not be resolved

error got resolved when I removed the import {change} from 'redux-form' statement. Instead now, I am passing the change from the form's props. To dynamically reset the value of Field following statement worked like charm:

dispatch(actions.change('FormName', 'FieldName', '')); 

Note: Below code did not work for me:

dispatch(change('FormName', 'FieldName', '')); 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.