From 51b47939cf45dcc69f4fcf26fe1632c6900cd4cf Mon Sep 17 00:00:00 2001 From: JackWillie Date: Mon, 27 Aug 2018 13:14:42 -0700 Subject: [PATCH] Added documentation for scrollEnabled property on TextInput, resolves https://github.com/facebook/react-native-website/pull/367 --- docs/textinput.md | 261 ++++++++++++++++++++++++---------------------- 1 file changed, 136 insertions(+), 125 deletions(-) diff --git a/docs/textinput.md b/docs/textinput.md index dd1ae41a..ad195bcd 100644 --- a/docs/textinput.md +++ b/docs/textinput.md @@ -93,60 +93,61 @@ Note that on Android performing text selection in input can change app's activit ### Props -* [View props...](view.md#props) - -- [`allowFontScaling`](textinput.md#allowfontscaling) -- [`autoCapitalize`](textinput.md#autocapitalize) -- [`autoCorrect`](textinput.md#autocorrect) -- [`autoFocus`](textinput.md#autofocus) -- [`blurOnSubmit`](textinput.md#bluronsubmit) -- [`caretHidden`](textinput.md#carethidden) -- [`clearButtonMode`](textinput.md#clearbuttonmode) -- [`clearTextOnFocus`](textinput.md#cleartextonfocus) -- [`contextMenuHidden`](textinput.md#contextMenuHidden) -- [`dataDetectorTypes`](textinput.md#datadetectortypes) -- [`defaultValue`](textinput.md#defaultvalue) -- [`disableFullscreenUI`](textinput.md#disablefullscreenui) -- [`editable`](textinput.md#editable) -- [`enablesReturnKeyAutomatically`](textinput.md#enablesreturnkeyautomatically) -- [`inlineImageLeft`](textinput.md#inlineimageleft) -- [`inlineImagePadding`](textinput.md#inlineimagepadding) -- [`keyboardAppearance`](textinput.md#keyboardappearance) -- [`keyboardType`](textinput.md#keyboardtype) -- [`maxLength`](textinput.md#maxlength) -- [`multiline`](textinput.md#multiline) -- [`numberOfLines`](textinput.md#numberoflines) -- [`onBlur`](textinput.md#onblur) -- [`onChange`](textinput.md#onchange) -- [`onChangeText`](textinput.md#onchangetext) -- [`onContentSizeChange`](textinput.md#oncontentsizechange) -- [`onEndEditing`](textinput.md#onendediting) -- [`onFocus`](textinput.md#onfocus) -- [`onKeyPress`](textinput.md#onkeypress) -- [`onLayout`](textinput.md#onlayout) -- [`onScroll`](textinput.md#onscroll) -- [`onSelectionChange`](textinput.md#onselectionchange) -- [`onSubmitEditing`](textinput.md#onsubmitediting) -- [`placeholder`](textinput.md#placeholder) -- [`placeholderTextColor`](textinput.md#placeholdertextcolor) -- [`returnKeyLabel`](textinput.md#returnkeylabel) -- [`returnKeyType`](textinput.md#returnkeytype) -- [`secureTextEntry`](textinput.md#securetextentry) -- [`selection`](textinput.md#selection) -- [`selectionColor`](textinput.md#selectioncolor) -- [`selectionState`](textinput.md#selectionstate) -- [`selectTextOnFocus`](textinput.md#selecttextonfocus) -- [`spellCheck`](textinput.md#spellcheck) -- [`textContentType`](textinput.md#textcontenttype) -- [`style`](textinput.md#style) -- [`textBreakStrategy`](textinput.md#textbreakstrategy) -- [`underlineColorAndroid`](textinput.md#underlinecolorandroid) -- [`value`](textinput.md#value) +- [View props...](view.md#props) + +* [`allowFontScaling`](textinput.md#allowfontscaling) +* [`autoCapitalize`](textinput.md#autocapitalize) +* [`autoCorrect`](textinput.md#autocorrect) +* [`autoFocus`](textinput.md#autofocus) +* [`blurOnSubmit`](textinput.md#bluronsubmit) +* [`caretHidden`](textinput.md#carethidden) +* [`clearButtonMode`](textinput.md#clearbuttonmode) +* [`clearTextOnFocus`](textinput.md#cleartextonfocus) +* [`contextMenuHidden`](textinput.md#contextMenuHidden) +* [`dataDetectorTypes`](textinput.md#datadetectortypes) +* [`defaultValue`](textinput.md#defaultvalue) +* [`disableFullscreenUI`](textinput.md#disablefullscreenui) +* [`editable`](textinput.md#editable) +* [`enablesReturnKeyAutomatically`](textinput.md#enablesreturnkeyautomatically) +* [`inlineImageLeft`](textinput.md#inlineimageleft) +* [`inlineImagePadding`](textinput.md#inlineimagepadding) +* [`keyboardAppearance`](textinput.md#keyboardappearance) +* [`keyboardType`](textinput.md#keyboardtype) +* [`maxLength`](textinput.md#maxlength) +* [`multiline`](textinput.md#multiline) +* [`numberOfLines`](textinput.md#numberoflines) +* [`onBlur`](textinput.md#onblur) +* [`onChange`](textinput.md#onchange) +* [`onChangeText`](textinput.md#onchangetext) +* [`onContentSizeChange`](textinput.md#oncontentsizechange) +* [`onEndEditing`](textinput.md#onendediting) +* [`onFocus`](textinput.md#onfocus) +* [`onKeyPress`](textinput.md#onkeypress) +* [`onLayout`](textinput.md#onlayout) +* [`onScroll`](textinput.md#onscroll) +* [`onSelectionChange`](textinput.md#onselectionchange) +* [`onSubmitEditing`](textinput.md#onsubmitediting) +* [`placeholder`](textinput.md#placeholder) +* [`placeholderTextColor`](textinput.md#placeholdertextcolor) +* [`returnKeyLabel`](textinput.md#returnkeylabel) +* [`returnKeyType`](textinput.md#returnkeytype) +* [`scrollEnabled`](textinput.md#scrollenabled) +* [`secureTextEntry`](textinput.md#securetextentry) +* [`selection`](textinput.md#selection) +* [`selectionColor`](textinput.md#selectioncolor) +* [`selectionState`](textinput.md#selectionstate) +* [`selectTextOnFocus`](textinput.md#selecttextonfocus) +* [`spellCheck`](textinput.md#spellcheck) +* [`textContentType`](textinput.md#textcontenttype) +* [`style`](textinput.md#style) +* [`textBreakStrategy`](textinput.md#textbreakstrategy) +* [`underlineColorAndroid`](textinput.md#underlinecolorandroid) +* [`value`](textinput.md#value) ### Methods -* [`clear`](textinput.md#clear) -* [`isFocused`](textinput.md#isfocused) +- [`clear`](textinput.md#clear) +- [`isFocused`](textinput.md#isfocused) --- @@ -168,10 +169,10 @@ Specifies whether fonts should scale to respect Text Size accessibility settings Can tell `TextInput` to automatically capitalize certain characters. -* `characters`: all characters. -* `words`: first letter of each word. -* `sentences`: first letter of each sentence (_default_). -* `none`: don't auto capitalize anything. +- `characters`: all characters. +- `words`: first letter of each word. +- `sentences`: first letter of each sentence (_default_). +- `none`: don't auto capitalize anything. | Type | Required | | ------------------------------------------------ | -------- | @@ -257,12 +258,12 @@ You can provide one type or an array of many types. Possible values for `dataDetectorTypes` are: -* `'phoneNumber'` -* `'link'` -* `'address'` -* `'calendarEvent'` -* `'none'` -* `'all'` +- `'phoneNumber'` +- `'link'` +- `'address'` +- `'calendarEvent'` +- `'none'` +- `'all'` | Type | Required | Platform | | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------- | @@ -352,29 +353,29 @@ Determines which keyboard to open, e.g.`numeric`. The following values work across platforms: -* `default` -* `number-pad` -* `decimal-pad` -* `numeric` -* `email-address` -* `phone-pad` +- `default` +- `number-pad` +- `decimal-pad` +- `numeric` +- `email-address` +- `phone-pad` _iOS Only_ The following values work on iOS only: -* `ascii-capable` -* `numbers-and-punctuation` -* `url` -* `name-phone-pad` -* `twitter` -* `web-search` +- `ascii-capable` +- `numbers-and-punctuation` +- `url` +- `name-phone-pad` +- `twitter` +- `web-search` _Android Only_ The following values work on Android only: -* `visible-password` +- `visible-password` | Type | Required | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | @@ -562,29 +563,29 @@ _Cross platform_ The following values work across platforms: -* `done` -* `go` -* `next` -* `search` -* `send` +- `done` +- `go` +- `next` +- `search` +- `send` _Android Only_ The following values work on Android only: -* `none` -* `previous` +- `none` +- `previous` _iOS Only_ The following values work on iOS only: -* `default` -* `emergency-call` -* `google` -* `join` -* `route` -* `yahoo` +- `default` +- `emergency-call` +- `google` +- `join` +- `route` +- `yahoo` | Type | Required | | --------------------------------------------------------------------------------------------------------------------------------- | -------- | @@ -592,9 +593,19 @@ The following values work on iOS only: --- +### `scrollEnabled` + +If `false`, scrolling of the text view will be disabled. The default value is `true`. Only works with `multiline={true}`. + +| Type | Required | Platform | +| ---- | -------- | -------- | +| bool | No | iOS | + +--- + ### `secureTextEntry` -If `true`, the text input obscures the text entered so that sensitive text like passwords stay secure. The default value is `false`. Does not work with 'multiline={true}'. +If `true`, the text input obscures the text entered so that sensitive text like passwords stay secure. The default value is `false`. Does not work with `multiline={true}`. | Type | Required | | ---- | -------- | @@ -628,9 +639,9 @@ An instance of `DocumentSelectionState`, this is some state that is responsible Some functionality that can be performed with this instance is: -* `blur()` -* `focus()` -* `update()` +- `blur()` +- `focus()` +- `update()` > You can reference `DocumentSelectionState` in [`vendor/document/selection/DocumentSelectionState.js`](https://github.com/facebook/react-native/blob/master/Libraries/vendor/document/selection/DocumentSelectionState.js) @@ -670,32 +681,32 @@ To disable autofill, set `textContentType` to `none`. Possible values for `textContentType` are: -* `none` -* `URL` -* `addressCity` -* `addressCityAndState` -* `addressState` -* `countryName` -* `creditCardNumber` -* `emailAddress` -* `familyName` -* `fullStreetAddress` -* `givenName` -* `jobTitle` -* `location` -* `middleName` -* `name` -* `namePrefix` -* `nameSuffix` -* `nickname` -* `organizationName` -* `postalCode` -* `streetAddressLine1` -* `streetAddressLine2` -* `sublocality` -* `telephoneNumber` -* `username` -* `password` +- `none` +- `URL` +- `addressCity` +- `addressCityAndState` +- `addressState` +- `countryName` +- `creditCardNumber` +- `emailAddress` +- `familyName` +- `fullStreetAddress` +- `givenName` +- `jobTitle` +- `location` +- `middleName` +- `name` +- `namePrefix` +- `nameSuffix` +- `nickname` +- `organizationName` +- `postalCode` +- `streetAddressLine1` +- `streetAddressLine2` +- `sublocality` +- `telephoneNumber` +- `username` +- `password` | Type | Required | Platform | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------- | @@ -707,14 +718,14 @@ Possible values for `textContentType` are: Note that not all Text styles are supported, an incomplete list of what is not supported includes: -* `borderLeftWidth` -* `borderTopWidth` -* `borderRightWidth` -* `borderBottomWidth` -* `borderTopLeftRadius` -* `borderTopRightRadius` -* `borderBottomRightRadius` -* `borderBottomLeftRadius` +- `borderLeftWidth` +- `borderTopWidth` +- `borderRightWidth` +- `borderBottomWidth` +- `borderTopLeftRadius` +- `borderTopRightRadius` +- `borderBottomRightRadius` +- `borderBottomLeftRadius` see [Issue#7070](https://github.com/facebook/react-native/issues/7070) for more detail.