-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[v2] useField: bound name to onChange and onBlur #1674
Comments
this would be better for web as well |
At the least, need to update the react-native docs (I may find time for a PR later in the week). This was a real head scratcher, since |
Seems like this wouldn't break any existing functionality, but would be super helpful for React Native users (like me!). At the very least a slightly modified |
I agree. Feel free to submit a PR. |
Would you prefer extending existing functionality of |
My guess is that this is actually breaking because people have messed with useField鈥檚 field.onChange although that was not my intention |
Hmm okay, sounds like |
Add it to formik native |
Happy to submit a PR, but just want to make sure I'm doing it right. Wouldn't this change be similar to (or the same as) cb71c04? Or are you recommending to do basically the same thing, but extract to |
Yes, but forgot I did that. Isn鈥檛 this fixed then? |
Seemed like it was out of date so I implemented the same thing in #2176, will also update the docs and tests accordingly. |
馃殌 Feature request
Current Behavior
I'm using
useField
on react-native and sinceTextInput
has no name attribute, I need to bind name to handlers manually:Desired Behavior
I spect to use
onChange
andonBlur
handlers like this:Suggested Solution
Bind
name
informik.getFieldProps
.I think here:
formik/src/Formik.tsx
Lines 765 to 770 in 377c36e
It should be replaced with:
Can this break
useField
for web users?Possible workarounds
Create a
useFieldNative
:Who does this impact? Who is this for?
react-native users
The text was updated successfully, but these errors were encountered: