Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Libraries/Components/TextInput/TextInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@ var TextInput = React.createClass({
onSubmitEditing={this.props.onSubmitEditing}
onSelectionChangeShouldSetResponder={() => true}
placeholder={this.props.placeholder}
placeholderTextColor={this.props.placeholderTextColor}
text={this.state.bufferedValue}
autoCapitalize={autoCapitalize}
autoCorrect={this.props.autoCorrect}
Expand Down
7 changes: 7 additions & 0 deletions React/Views/RCTTextFieldManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ - (UIView *)view
{
view.font = [RCTConvert UIFont:view.font withFamily:json ?: defaultView.font.familyName];
}
RCT_CUSTOM_VIEW_PROPERTY(placeholderTextColor, UIColor, RCTTextField)
{
if (view.placeholder != nil && [view respondsToSelector:@selector(setAttributedPlaceholder:)]) {
NSAttributedString *attributedPlaceholder = [[NSAttributedString alloc] initWithString:view.placeholder attributes:@{NSFontAttributeName:view.font, NSForegroundColorAttributeName:[RCTConvert UIColor:json]}];
[view setAttributedPlaceholder:attributedPlaceholder];
}
}

- (RCTViewManagerUIBlock)uiBlockToAmendWithShadowView:(RCTShadowView *)shadowView
{
Expand Down