I'm using the default example from Material UI steppers, which can be found here, along with React Hook Form, but when I register the fields, e.g on the first step, they are not submitted when the form is submitted at the last step, but the fields from the last step, where the submit button is, are submitted.
I tried to use the provider but it didn't work, I tried to elevate where I use useForm() and use useCallback(()=> {}, []) so the reference is not lost between renders, but nothing worked... I have three levels (base component -> modal (tried useForm() here / provide the context) -> stepper (tried useForm() here - each step is another component) and I provided the context at the right place so I don't understand why it is not storing even though I keep the reference and the data in a context. Any tips?
React Hook Form 6.0.8 and Material UI 5 alpha 4. I used the 6.0.2 and 5 alpha 2 and the same result.