Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Array values in nested object aren't loaded #51

Open
paradisi-davide-servizi opened this issue Nov 23, 2023 · 0 comments
Open

Array values in nested object aren't loaded #51

paradisi-davide-servizi opened this issue Nov 23, 2023 · 0 comments

Comments

@paradisi-davide-servizi
Copy link

paradisi-davide-servizi commented Nov 23, 2023

The AutoFormArray component has a bug in it's hook usage that leads to arrays inside nested objects to not load values.

Original version:

const { fields, append, remove } = useFieldArray({ control: form.control, name, });

Solution:

const { fields, append, remove } = useFieldArray({ control: form.control, name: path.join(".") });

Side note, @vantezzen i'd love to collaborate with you on this repo (mainly fixing the rough edges i find and adding support for translations) but i'm not the best expert in using git. Feel free to let me know if we can have a talk!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant