Permalink
Browse files

Default TextInput autoCapitalize to sentences on Android

Summary:
Currently `TextInput.autoCapitalize` is defaulting to 'none' on Android.  This PR sets the default to 'sentences', to match iOS and the PropTypes documentation.

Fixes #14846
Closes #14853

Differential Revision: D5918196

Pulled By: shergin

fbshipit-source-id: d0d00e75d44a410c6821b4ff8910099aae2b2c7c
  • Loading branch information...
jamesisaac authored and facebook-github-bot committed Sep 27, 2017
1 parent ee8aedd commit 227a5f4e8f1262611a956f04eecdb44251c723a4
Showing with 3 additions and 1 deletion.
  1. +3 −1 Libraries/Components/TextInput/TextInput.js
@@ -749,7 +749,9 @@ const TextInput = createReactClass({
props.style = [props.style, {height: this.state.layoutHeight}];
}
props.autoCapitalize =
UIManager.AndroidTextInput.Constants.AutoCapitalizationType[this.props.autoCapitalize];
UIManager.AndroidTextInput.Constants.AutoCapitalizationType[
props.autoCapitalize || 'sentences'
];
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This comment
* suppresses an error when upgrading Flow's support for React. To see the
* error delete this comment and run Flow. */

0 comments on commit 227a5f4

Please sign in to comment.