Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Turn off autoCapitalize on ALL React Native Inputs (iOS)

Most of my Inputs are being auto-Capitalized on iOS only. I know there's the autoCapitalize property that I could set to false on every input to turn it off but I'm wondering if there's a global config I can apply project-wide.

like image 547
Milox Avatar asked Mar 02 '18 13:03

Milox


2 Answers

I don't know any global config for that but simplest solution that I can think of would be creating a custom component with default autoCapitalize value.

Example

const CustomTextInput = (props) => (<TextInput autoCapitalize="none" ...props />)
like image 125
bennygenel Avatar answered Oct 12 '22 22:10

bennygenel


Like mentioned in the comment in one of the answer, use the following props:

autoCapitalize="none"

Adding this as the answer as people might miss out the info in comments.

like image 20
Mahendra Liya Avatar answered Oct 12 '22 23:10

Mahendra Liya