How do you register a field with React Final Form with MUI TextField?

187 views Asked by At

I have an MUI TextField (not the mui-rff) that I want to set a touched to when there is an onchange event on the textfield. I tried adding the name attribute to it, but I'm not sure how to register it so Final Form can see that it's been touched.

<Form>
  <MyComponent name="hello" />
</Form>

// MyComponent returns a TextField
<TextField name={name} />
1

There are 1 answers

0
phpwebdev On

You will need an onchange event handler and function for the textfield.