Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a5db0ce

Browse files
author
Daryl Rowland
committed
Enabled textAlign in TextInput
Summary: Added remapping of style textAlign property to textAlignment (which is the name of the same property on text input components) Closes facebook#772 Github Author: Daryl Rowland <[email protected]> Test Plan: Not sure. I tried cleaned and rebuilt and my TextInput works, though! Do we need to set up any unit tests or examples for this?
1 parent 4ac5c7e commit a5db0ce

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

React/Views/RCTTextFieldManager.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ - (UIView *)view
3939
RCT_REMAP_VIEW_PROPERTY(password, secureTextEntry, BOOL) // backwards compatibility
4040
RCT_REMAP_VIEW_PROPERTY(color, textColor, UIColor)
4141
RCT_REMAP_VIEW_PROPERTY(autoCapitalize, autocapitalizationType, UITextAutocapitalizationType)
42+
RCT_REMAP_VIEW_PROPERTY(textAlign, textAlignment, NSTextAlignment)
4243
RCT_CUSTOM_VIEW_PROPERTY(fontSize, CGFloat, RCTTextField)
4344
{
4445
view.font = [RCTConvert UIFont:view.font withSize:json ?: @(defaultView.font.pointSize)];

0 commit comments

Comments
 (0)