From e670e8135b2098dfe2d6874e0673652d6463f197 Mon Sep 17 00:00:00 2001 From: Nicolas Gallagher Date: Fri, 20 Dec 2019 23:30:37 +0000 Subject: [PATCH] [fix] TextInput forwards placeholderTextColor Fix a bug introduced by 924e891f58f137e363fea19aa9098b74cdf4555a Ref #1512 --- .../docs/src/components/TextInput/TextInput.stories.mdx | 6 +++--- packages/react-native-web/src/exports/TextInput/index.js | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/docs/src/components/TextInput/TextInput.stories.mdx b/packages/docs/src/components/TextInput/TextInput.stories.mdx index 28001342..6cf67a68 100644 --- a/packages/docs/src/components/TextInput/TextInput.stories.mdx +++ b/packages/docs/src/components/TextInput/TextInput.stories.mdx @@ -184,7 +184,7 @@ The string that will be rendered in an empty `TextInput` before text has been en -### placeholderTextColor: ?color +### placeholderTextColor The text color of the placeholder string. @@ -212,7 +212,7 @@ passwords stay secure. (Not available when `multiline` is `true`.) -### selection: ?{ start: number, end: ?number } +### selection The start and end of the text input's selection. Set start and end to the same value to position the cursor. @@ -232,7 +232,7 @@ If `true`, all text will automatically be selected on focus. If `false`, disables spell-check style (i.e. red underlines). The default value is inherited from `autoCorrect`. (Only available in supporting browsers). -### style: ?style +### style ```js { diff --git a/packages/react-native-web/src/exports/TextInput/index.js b/packages/react-native-web/src/exports/TextInput/index.js index 6b520fff..72056122 100644 --- a/packages/react-native-web/src/exports/TextInput/index.js +++ b/packages/react-native-web/src/exports/TextInput/index.js @@ -107,6 +107,7 @@ class TextInput extends React.Component { multiline = false, numberOfLines = 1, placeholder, + placeholderTextColor, returnKeyType, secureTextEntry = false, spellCheck, @@ -162,6 +163,7 @@ class TextInput extends React.Component { onKeyPress: this._handleKeyPress, onSelect: normalizeEventHandler(this._handleSelectionChange), placeholder, + placeholderTextColor, readOnly: !editable, ref: this._setNode, spellCheck: spellCheck != null ? spellCheck : autoCorrect,