diff --git a/src/components/TextInput/__tests__/index-test.js b/src/components/TextInput/__tests__/index-test.js
index ded28b8d..dd5b02a3 100644
--- a/src/components/TextInput/__tests__/index-test.js
+++ b/src/components/TextInput/__tests__/index-test.js
@@ -22,12 +22,12 @@ const testIfDocumentIsFocused = (message, fn) => {
suite('components/TextInput', () => {
test('prop "autoComplete"', () => {
- // off
- let input = findNativeInput(shallow());
- assert.equal(input.prop('autoComplete'), undefined);
// on
- input = findNativeInput(shallow());
+ let input = findNativeInput(shallow());
assert.equal(input.prop('autoComplete'), 'on');
+ // off
+ input = findNativeInput(shallow());
+ assert.equal(input.prop('autoComplete'), 'off');
});
test('prop "autoFocus"', () => {
@@ -179,8 +179,8 @@ suite('components/TextInput', () => {
const input = findNativeInput(mount());
input.simulate('select', { target: { selectionStart: 0, selectionEnd: 3 } });
function onSelectionChange(e) {
- assert.equal(e.selectionEnd, 3);
- assert.equal(e.selectionStart, 0);
+ assert.equal(e.nativeEvent.selection.end, 3);
+ assert.equal(e.nativeEvent.selection.start, 0);
done();
}
});
diff --git a/src/components/TextInput/index.js b/src/components/TextInput/index.js
index 6f8d4877..9dc98b7f 100644
--- a/src/components/TextInput/index.js
+++ b/src/components/TextInput/index.js
@@ -79,11 +79,11 @@ class TextInput extends Component {
placeholder: PropTypes.string,
placeholderTextColor: PropTypes.string,
secureTextEntry: PropTypes.bool,
+ selectTextOnFocus: PropTypes.bool,
selection: PropTypes.shape({
start: PropTypes.number.isRequired,
end: PropTypes.number
}),
- selectTextOnFocus: PropTypes.bool,
style: Text.propTypes.style,
testID: Text.propTypes.testID,
value: PropTypes.string