iOS textContentType suggestion are trimmed with maxLength, and can't be overridden. #44866
Labels
Issue: Author Provided Repro
This issue can be reproduced in Snack or an attached project.
Newer Patch Available
Platform: iOS
iOS applications.
Description
When adding textContentType in iOS with maxLength=10 the tap on suggestion gives irrelevant results.
Steps to reproduce
In TextInput try adding below props;
This will give mobile number suggestion to you, the mobile number sometimes have country code and spaces in between, when user tap on the mobile number the autofill results are not suitable.
For example:
If mobile number is 88844 33322 having 11 characters the last digit will be trimmed
suggestion: 88844 33322
result: 88844 3332
So we need a mechanism to trim out the spaces/country code before filling the same in the textinput. Currently onChangeText is called with trimmed result, so no way to format before calling onChangeText, when maxLength is set.
React Native Version
0.73.1
Affected Platforms
Runtime - iOS
Output of
npx react-native info
Stacktrace or Logs
Reproducer
Snack (https://snack.expo.dev/coZ_oQ_slq87v8yIMImV4)
Screenshots and Videos
No response
The text was updated successfully, but these errors were encountered: