In a React project, I have a table which renders rows with lots of columns, most of them containing Fluent UI controls. I can use the react-hook-form Controller component to handle most of the cases. The issue is that part of the controls I'm using don't have the 'name' property (mostly dropdown and people picker). React-hook-form depends on it. Does this mean that I can't use it in this project?
Asked
Active
Viewed 537 times
1
-
1Not sure if I understand. You use [`Controller`](https://react-hook-form.com/api#Controller) to manually register the inputs and you pass a unique `name` to it. Can you provide a minimal, reproducible example using [CodeSandbox](https://codesandbox.io) or something similar? – Arun Kumar Mohan Mar 14 '21 at 22:59
-
@ArunKumarMohan if I understand correctly, I need to pass name from Controller into the component which it is controlling (ie. dropdown). Or it is enough to have name specified on the Controller for everything to work? – n0e Mar 14 '21 at 23:05