-
Notifications
You must be signed in to change notification settings - Fork 24.6k
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
[TextInput] How do you implement maxLength for TextInput? #1945
Comments
What if you checked onTextChange if the text was <= the desired length of characters? |
onChangeText still makes the change. I want to make it so that if the user is not allowed to enter in more than the maxLength. When I used onChangeText, it still changes the input |
We would need to handle this on the native side, eg: http://stackoverflow.com/questions/2523501/set-uitextfield-maximum-length Overall, TextInput needs a lot of work. I know @sahrens is working on some improvements now but any community help on this one is very much appreciated! What we would need to do:
|
This and several fixes landed internally and should sync out this week.
|
@sahrens - awesome, super excited! thanks! |
@brentvatne this landed into master so this can probably be closed? |
Closing this since maxLength has been implemented. Will open a new issue for the problem with Chinese characters. |
Is there a way for you to limit the number of characters that you can enter into a textInput similar to how maxLength works?
The text was updated successfully, but these errors were encountered: