S
S
semennn2018-05-25 00:17:57
React
semennn, 2018-05-25 00:17:57

How to change the behavior of redux-form?

Hello. I use the redax form, but the field validation takes place in the class method. When I press the button below the form, the fields are validated, if at any stage of filling out the form, press Enter on the keyboard, then the form is sent as is, that is, half empty.
Now the form has an onSubmit={handleSubmit(this.somthing)} attribute, I tried to transfer it to a button and replace it with onClick, the form is still sent by pressing Enter. How to disable this action? Experimented with onKeyPress, onKeyDown but to no avail.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question