-
Notifications
You must be signed in to change notification settings - Fork 15
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
DropZone - Nested property does not work #49
Comments
Actually |
Sorry, maybe I was not clear. What I mean is: Formik Forms support natively complex objects and nested properties, please see the link below so let's say that I have an interrface like this:
so now, I want to use DropZone to capture some files (1 or many) into the variable document:Files[], what I would normally do with any other field type is something like this (please again see the official Formik documentation here)
now the point is not if document is an array or not, but how to refernece it in the Formik component name. Hope this clarify my issue. Using the same approach with DropZone I should be able to do this:
But as told in my first post this is not working and the problem is clear in the line:
the point is not if files is an array or not, the point is the values[name] always return undefined for nested object. hope this clarify the issue. |
Ok, now I got what you meant, I’ll look into it but can’t promise that it will be fixed soon. You are always welcome to submit a fix via a PR |
Version
^4.0.5
Mode
All
Describe the bug
Using DropZone, if the filed name is a nested field that application fails. For example:
To Reproduce
use the code below:
Expected behavior
nested values should be set
Additional context
The issue is at src/lib/components/DropZone/DropZone.js line 29
react-formik-ui/src/lib/components/DropZone/DropZone.js
Line 29 in 8c2784f
if the name is "files1.files2" of course values["files1.files2"] return undefined.
Can you please fix this?
Thanks
The text was updated successfully, but these errors were encountered: