fateh999 / react-native-paper-form-builder

React Native Paper Form Builder with inbuilt Validation, dropdown, autocomplete, checkbox, switch and radio inputs.
MIT License
113 stars 24 forks source link

For Autocomplete getting Field is missing with `name` attribute: warning #20

Closed kahaniverse closed 3 years ago

kahaniverse commented 3 years ago

I think the usage of as in Controller is deprecated. https://react-hook-form.com/api#Controller suggests that For TypeScript user, if you are using custom component with required fields: onChange, onBlur, value, It will complain about missing declared field. Please use render instead of as.

Please change this to render instead of as, which is likely to take away this warning.

Also getting: Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?

Check the render method of Controller. in AppAutocomplete (at FormBuilder.js:46)