I have a form which has an onSubmit
I want to run this function every time the user changes a value in the input field so I have attached this little function on the form
onChange={() => {
formRef.current?.submit();
}}
My problem is that now when I change values in the input the page refreshes even trought I have e.preventDefault();
on my onSubmit
onSubmit={(e) => {
e.preventDefault();
...
Thank you for reading.