Skip to content

Commit 6391156

Browse files
authored
Merge pull request #1238 from StoDevX/textfield-capitalization
allow the capitalization prop
2 parents 68c655d + c8cb5f1 commit 6391156

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

source/views/building-hours/report/overview.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@ class EditableSchedule extends React.PureComponent {
316316
const TitleCell = ({text, onChange = () => {}}) =>
317317
<CellTextField
318318
hideLabel={true}
319+
autoCapitalize="words"
319320
returnKeyType="done"
320321
placeholder="Title"
321322
value={text}
@@ -327,6 +328,7 @@ const TitleCell = ({text, onChange = () => {}}) =>
327328
const NotesCell = ({text, onChange}) =>
328329
<CellTextField
329330
hideLabel={true}
331+
autoCapitalize="sentences"
330332
returnKeyType="done"
331333
placeholder="Notes"
332334
value={text}

source/views/components/cells/textfield.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export class CellTextField extends React.Component {
3232
_ref: () => {},
3333
returnKeyType: 'default',
3434
secureTextEntry: false,
35+
autoCapitalize: 'none',
3536
}
3637

3738
props: {
@@ -43,6 +44,7 @@ export class CellTextField extends React.Component {
4344
placeholder: string,
4445
returnKeyType: 'done' | 'next' | 'default',
4546
secureTextEntry: boolean,
47+
autoCapitalize: 'characters' | 'words' | 'sentences' | 'none',
4648
value: string,
4749
labelWidth?: number,
4850
}
@@ -78,7 +80,7 @@ export class CellTextField extends React.Component {
7880
cellAccessoryView={
7981
<TextInput
8082
ref={this.cacheRef}
81-
autoCapitalize="none"
83+
autoCapitalize={this.props.autoCapitalize}
8284
autoCorrect={false}
8385
clearButtonMode="while-editing"
8486
disabled={this.props.disabled}

0 commit comments

Comments
 (0)