diff --git a/src/components/TextInput/__tests__/index-test.js b/src/components/TextInput/__tests__/index-test.js
index eae052cc..3e02acf5 100644
--- a/src/components/TextInput/__tests__/index-test.js
+++ b/src/components/TextInput/__tests__/index-test.js
@@ -169,8 +169,6 @@ describe('components/TextInput', () => {
}
});
- test('prop "onLayout"');
-
test('prop "onSelectionChange"', (done) => {
const input = findNativeInput(mount());
input.simulate('select', { target: { selectionStart: 0, selectionEnd: 3 } });
@@ -181,6 +179,16 @@ describe('components/TextInput', () => {
}
});
+ describe('prop "onSubmitEditing"', () => {
+ test('single-line input', (done) => {
+ const input = findNativeInput(mount());
+ input.simulate('keyPress', { which: 13 });
+ function onSubmitEditing(e) {
+ done();
+ }
+ });
+ });
+
test('prop "secureTextEntry"', () => {
let input = findNativeInput(shallow());
expect(input.prop('type')).toEqual('password');
diff --git a/src/components/TextInput/index.js b/src/components/TextInput/index.js
index 923e4b1c..4f0adcb7 100644
--- a/src/components/TextInput/index.js
+++ b/src/components/TextInput/index.js
@@ -72,6 +72,7 @@ class TextInput extends Component {
onFocus: PropTypes.func,
onKeyPress: PropTypes.func,
onSelectionChange: PropTypes.func,
+ onSubmitEditing: PropTypes.func,
placeholder: PropTypes.string,
placeholderTextColor: PropTypes.string,
secureTextEntry: PropTypes.bool,
@@ -188,6 +189,7 @@ class TextInput extends Component {
const props = {
...other,
autoCorrect: autoCorrect ? 'on' : 'off',
+ dir: 'auto',
onBlur: normalizeEventHandler(this._handleBlur),
onChange: normalizeEventHandler(this._handleChange),
onFocus: normalizeEventHandler(this._handleFocus),