Closed yedhink closed 3 years ago
@dineshpanda Can you provide some clarifications.
@edwinbbu @goutham-subramanyam
Let me know if i can get a confirmation on whether to sync this component. Refer: https://github.com/bigbinary/neeto-ui/issues/55#issue-753197108
@dineshpanda Can you provide some clarifications.
Sorry for responding after so many days. I don't know why I'm not getting GitHub notifications sometime.
@edwinbbu When we have initial values say {languages: { 0: "Ruby", 1: "JS", 2: "Java" }}
for a Formik form with a Select
field name languages
where languages
is a FieldArray
. By default, in this case Formik was not handling nested values.
That was the primary reason to use Ramda helpers to set nested values correctly.
However I see a solution proposed by @yedhink to use Formik's setValues
and use the nested field name as a variable key to update the form values, which would handle the nested case as well.
Ex: setValues([field.name]: field.value)
I wish Formik could handle this case by default since setValues is built in and we are providing a name to each field.
@yedhink's solution would simplify the onChange
handler in Select
component and that has been merged to neeto-help
.
I have informed @yedhink regarding the issues to show validation error messages in forms where FieldArray
is being used.
@dineshpanda
Yup. I have taken care of the error scenario as well that you had pointed out. Will update the PR over here soon. Will cc
you so that you could also give some input, on whether we need to change anything.
Points to note
formik/Select.js
neeto-ui
packageNitroUI
internalsSync Required or Not
formik/Select.js
that needs to be synced toneeto-ui
package fromNitroUI
? - NoNitroUI
toneetoui
or not. From my understanding, no need. The currentneetoui
version will do the job.Diff