Answer the question
In order to leave comments, you need to log in
How to cancel page refresh on post request to json-server?
I'm using form from antd
tried using e.preventDefault() doesn't help
Answer the question
In order to leave comments, you need to log in
Try adding onClick={onFinish} to your form submit button
, and in the onFinish itself, catch the event and use preventdefault
<Button type="primary" htmlType="submit" onClick={onFinish}>
Сохранить
</Button>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question