Closed
Description
Description
Following the work from #34424, there was some (unexpected?) breaking changes to <TextInput />
.
Before there were 2 props:
- autoComplete => android (name-family, name-given, etc)
- textContentType => iOS (familyName, givenName, etc)
Now due to the changes, there is still 2 props:
- autoComplete => android & iOS
- textContentType => iOS
But the new implementation looks like this:
There is a new universal set of keys (some of them identical to the old one, some news)
When you set autoComplete:
- android: check if name is in the new set of keys, if so map to the android value, else pass it directly to android (compatibility with old keys)
- iOS: check if the name is in the set of keys, if so map to the iOS value, else if textContentType is defined, use it.
What's breaking is that for example if you used autoComplete = "A" and textContentType="B", on 0.71 it will be treated as textContentType="A" on 0.71
How we could have mitigated this:
-> Deprecate and set warnings on textContentType but still use it first in the implementation so that user migrate without breaking their apps
Version
0.71
Output of npx react-native info
/
Steps to reproduce
Use TextInput
with autoComplete and textContentType
Snack, code example, screenshot, or link to a repository
/
Metadata
Metadata
Assignees
Labels
No labels