Skip to content

Commit 8da3895

Browse files
Inbal-Tishethanshar
authored andcommitted
removing auto capitalization for fixed title label (#123)
* removing auto-capitalization for fixed title label * adding autoCapitalize example
1 parent 793285a commit 8da3895

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

demo/src/screens/componentScreens/InputsScreen.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export default class InputScreen extends Component {
4949

5050
<TextInput
5151
text70
52-
title="Title"
52+
title="title"
5353
placeholder="character counter && error"
5454
maxLength={3}
5555
showCharacterCounter
@@ -66,6 +66,7 @@ export default class InputScreen extends Component {
6666
showCharacterCounter
6767
onChangeText={text => this.setState({error: text ? '' : 'This field is required'})}
6868
error={this.state.error}
69+
autoCapitalize="words"
6970
/>
7071

7172
<TextInput

src/components/inputs/TextInput.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,12 +254,11 @@ export default class TextInput extends BaseInput {
254254
renderTitle() {
255255
const {floatingPlaceholder, title} = this.props;
256256
if (!floatingPlaceholder && title) {
257-
const capitalizedTitle = _.capitalize(title);
258257
return (
259258
<Text
260259
style={this.styles.title}
261260
>
262-
{capitalizedTitle}
261+
{title}
263262
</Text>
264263
);
265264
}

0 commit comments

Comments
 (0)