diff --git a/Libraries/Components/TextInput/TextInput.js b/Libraries/Components/TextInput/TextInput.js index 261e11b82b59d8..c6e96ba9e0addc 100644 --- a/Libraries/Components/TextInput/TextInput.js +++ b/Libraries/Components/TextInput/TextInput.js @@ -1107,6 +1107,7 @@ function InternalTextInput(props: Props): React.Node { } else if (Platform.OS === 'android') { const style = [props.style]; const autoCapitalize = props.autoCapitalize || 'sentences'; + const placeholder = props.placeholder || ''; let children = props.children; const childCount = React.Children.count(children); invariant( @@ -1135,6 +1136,7 @@ function InternalTextInput(props: Props): React.Node { * with the props for TextInput. This will need to get fixed */ onScroll={_onScroll} onSelectionChange={_onSelectionChange} + placeholder={placeholder} selection={selection} style={style} text={text} diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java index 3a21ef71c4bdb4..ae48d7d24d2e95 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java @@ -398,7 +398,7 @@ public void setAllowFontScaling(ReactEditText view, boolean allowFontScaling) { } @ReactProp(name = "placeholder") - public void setPlaceholder(ReactEditText view, @Nullable String placeholder) { + public void setPlaceholder(ReactEditText view, String placeholder) { view.setHint(placeholder); }