bamlab / bamlab/react-native-formik
Custom input with initial value is not working
- Dominant language
- JavaScript
- Stars
- 398
- Forks
- 50
- PR merge metrics
- No merged PRs in 30d
Description
If we give initial value as per the code in WithFormikControl the initila value from props always overrides the value got from getValue
`const withFormikControl = compose(
withErrorIfNeeded,
connect,
mapProps(
({
formik: { values, setFieldValue, setFieldTouched },
name,
value,
...props
}) => ({
value: get(values, name) === undefined ? value : get(values, name),
setFieldValue: (value, ...args) => setFieldValue(name, value, ...args),
setFieldTouched: (value, ...args) =>
setFieldTouched(name, value, ...args),
name,
...props
})
)
);`
this should be the code
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.