Fix TextInput 'defaultValue' propTypes to 'string'

Summary:
Because `TextInput` only render the `defaultValue` of `string`, when using other types of values, it will render empty('') without any Warnings.
Closes https://github.com/facebook/react-native/pull/11478

Differential Revision: D4340132

Pulled By: lacker

fbshipit-source-id: aedb96d49277836000c0adc53007c97db6363253
This commit is contained in:
Bin Yue 2017-03-15 17:46:14 -07:00 committed by Facebook Github Bot
parent 35046984db
commit c53404a688
1 changed files with 1 additions and 1 deletions

View File

@ -452,7 +452,7 @@ const TextInput = React.createClass({
* Useful for simple use-cases where you do not want to deal with listening
* to events and updating the value prop to keep the controlled state in sync.
*/
defaultValue: PropTypes.node,
defaultValue: PropTypes.string,
/**
* When the clear button should appear on the right side of the text view.
* @platform ios