react-native-macos/Libraries/Components
Christian Brevik d4fb87b0b8 Add iOS 10 textContentType for TextInput
Summary:
Setting `textContentType` will provide the keyboard and system with semantic meaning for inputs. Should enable password/username autofill in apps running on iOS 11+ as demonstrated here: https://developer.apple.com/videos/play/wwdc2017/206/

Also gives you the ability to disable autofill by setting `textContentType="none"`: https://stackoverflow.com/questions/48489479/react-native-disable-password-autofill-option-on-ios-keyboard

Adding `textContentType` equal to `username` or `password`  should give you an autofill-bar over the keyboard which will let you fill in values from the device Keychain:

![image](https://user-images.githubusercontent.com/4932625/37848513-b2170490-2ed4-11e8-85bf-895823d4f98a.png)

Setting the appropriate `textContentType` will fill in the correct value in the `TextInput`.
I have only been able to get this to work on device, and not simulator.

Usage:
```jsx
<TextInput
    value={this.state.username}
    onChangeText={this.setUserName}
    textContentType="username"
/>
```

```jsx
<TextInput
    value={this.state.password}
    onChangeText={this.setPassword}
    secureTextEntry={true}
    textContentType="password"
/>
```

To disable:
```jsx
<TextInput
    value={this.state.password}
    onChangeText={this.setPassword}
    secureTextEntry={true}
    textContentType="none"
/>
```

This will set `textContentType` to an empty string: https://stackoverflow.com/a/46474180/5703116

<!--
  Does this PR require a documentation change?
  Create a PR at https://github.com/facebook/react-native-website and add a link to it here.
-->

Docs PR coming up.

[IOS] [MINOR] [TextInput] - Added `textContentType` prop for iOS 10+. Will enable password autofill for iOS 11+.
Closes https://github.com/facebook/react-native/pull/18526

Differential Revision: D7469630

Pulled By: hramos

fbshipit-source-id: 852a9749be98d477ecd82154c0a65a7c084521c1
2018-04-02 02:46:43 -07:00
..
AccessibilityInfo Converting Libraries/Components to not use var 2018-03-03 15:38:18 -08:00
ActivityIndicator Avoid var specific hoisting rules 2018-03-01 16:57:25 -08:00
AppleTV Add support for Android TV devices 2018-03-06 10:47:02 -08:00
CheckBox Update license headers for MIT license 2018-02-16 18:31:53 -08:00
Clipboard Update license headers for MIT license 2018-02-16 18:31:53 -08:00
DatePicker Converting Libraries/Components to not use var 2018-03-03 15:38:18 -08:00
DatePickerAndroid Update license headers for MIT license 2018-02-16 18:31:53 -08:00
DrawerAndroid Converting Libraries/Components to not use var 2018-03-03 15:38:18 -08:00
Keyboard Update license headers for MIT license 2018-02-16 18:31:53 -08:00
MaskedView Update license headers for MIT license 2018-02-16 18:31:53 -08:00
Navigation Converting Libraries/Components to not use var 2018-03-03 15:38:18 -08:00
Picker Converting Libraries/Components to not use var 2018-03-03 15:38:18 -08:00
ProgressBarAndroid Update license headers for MIT license 2018-02-16 18:31:53 -08:00
ProgressViewIOS Converting Libraries/Components to not use var 2018-03-03 15:38:18 -08:00
RefreshControl Fix RefreshControl's dependency on AndroidSwipeRefreshLayout 2018-03-07 18:57:42 -08:00
SafeAreaView Update license headers for MIT license 2018-02-16 18:31:53 -08:00
ScrollView Added nestedScrollEnabled prop to scroll view for android 2018-03-18 20:16:15 -07:00
SegmentedControlIOS Converting Libraries/Components to not use var 2018-03-03 15:38:18 -08:00
Slider Converting Libraries/Components to not use var 2018-03-03 15:38:18 -08:00
StatusBar Update license headers for MIT license 2018-02-16 18:31:53 -08:00
Switch Converting Libraries/Components to not use var 2018-03-03 15:38:18 -08:00
TabBarIOS StyleObj -> DangerouslyImpreciseStyleProp 2018-03-07 13:24:20 -08:00
TextInput Add iOS 10 textContentType for TextInput 2018-04-02 02:46:43 -07:00
TimePickerAndroid Update license headers for MIT license 2018-02-16 18:31:53 -08:00
ToastAndroid Converting Libraries/Components to not use var 2018-03-03 15:38:18 -08:00
ToolbarAndroid Converting Libraries/Components to not use var 2018-03-03 15:38:18 -08:00
Touchable Add support for Android TV devices 2018-03-06 10:47:02 -08:00
UnimplementedViews Update license headers for MIT license 2018-02-16 18:31:53 -08:00
View Pass fabric flag from native to JS 2018-03-23 09:32:00 -07:00
ViewPager Converting Libraries/Components to not use var 2018-03-03 15:38:18 -08:00
WebView Converting Libraries/Components to not use var 2018-03-03 15:38:18 -08:00
Button.js Add support for Android TV devices 2018-03-06 10:47:02 -08:00
LazyRenderer.js Converting Libraries/Components to not use var 2018-03-03 15:38:18 -08:00
ScrollResponder.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
StaticContainer.react.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
StaticRenderer.js Converting Libraries/Components to not use var 2018-03-03 15:38:18 -08:00
Subscribable.js Converting Libraries/Components to not use var 2018-03-03 15:38:18 -08:00