-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Warning: Failed prop type: Invalid prop autoComplete
of value password-new
#32557
Comments
My assumption that the culprit was the difference between |
…Complete values (#32575) Summary: <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> This fixes the "Failed prop type: Invalid prop `autoComplete` of value `[any-of-the-new-values]`" warning, as mentioned in #32557. [This commit](d9e0ea7) introduced new HintConstants for autofill, but added those only to [`TextInput.js`](https://github.com/facebook/react-native/blob/main/Libraries/Components/TextInput/TextInput.js#L331) and forgot to add them (and the new docs' description) to either [`AndroidTextInputNativeComponent`](https://github.com/facebook/react-native/blob/main/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js#L99) or [`DeprecatedTextInputPropTypes.js`](https://github.com/facebook/react-native/blob/main/Libraries/DeprecatedPropTypes/DeprecatedTextInputPropTypes.js#L67). I know, the latter has clearly been deprecated, but until it is actually being removed, it shouldn't throw warnings like that. ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [Android] [Fixed] - Updated TextInput prop types to accomodate for new autoComplete values Pull Request resolved: #32575 Test Plan: There is no warning after these changes. Reviewed By: yungsters Differential Revision: D32324108 Pulled By: lunaleaps fbshipit-source-id: df27cbbd54788f26471029c9201c6a27ca8b7893
@TheWirv I still see this error with 'sms-otp' value in 0.67.1 🤔 |
@itsjaychang Yeah we got it working. Make sure you set |
Hello, How to use it ? i create new RN project with 0.68 version. and i dont how to try this sms-otp ? i open emulator and try sms similator ? |
To test it out on simulator make sure you are signed in with your google account in simulator, then navigate to settings / privacy settings and there you should see autofill, make sure it is enabled... Another way should be to install some other 3rd party service on your phone which will manage autofill stuff and to test it out with that... |
than you very much but actually it is not set to true but : importantForAutofill="yes" |
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
This issue was closed because it has been stalled for 7 days with no activity. |
Description
I am getting this warning when supplying the value
'password-new'
toTextInput
'sautoComplete
prop, although this is supported, as per the latest docs. This is the full warning:I am guessing this is because of the type discrepancies between the JS and native component files.
Version
0.66.2
Output of
react-native info
Steps to reproduce
TextInput
componentautoComplete
prop with value'password-new'
Snack, code example, screenshot, or link to a repository
The text was updated successfully, but these errors were encountered: