mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-11 22:32:38 +08:00
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 https://github.com/facebook/react-native/pull/772 Github Author: Daryl Rowland <daryl@cloudyclear.com> 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?
This commit is contained in:
@@ -39,6 +39,7 @@ RCT_EXPORT_VIEW_PROPERTY(secureTextEntry, BOOL)
|
||||
RCT_REMAP_VIEW_PROPERTY(password, secureTextEntry, BOOL) // backwards compatibility
|
||||
RCT_REMAP_VIEW_PROPERTY(color, textColor, UIColor)
|
||||
RCT_REMAP_VIEW_PROPERTY(autoCapitalize, autocapitalizationType, UITextAutocapitalizationType)
|
||||
RCT_REMAP_VIEW_PROPERTY(textAlign, textAlignment, NSTextAlignment)
|
||||
RCT_CUSTOM_VIEW_PROPERTY(fontSize, CGFloat, RCTTextField)
|
||||
{
|
||||
view.font = [RCTConvert UIFont:view.font withSize:json ?: @(defaultView.font.pointSize)];
|
||||
|
||||
Reference in New Issue
Block a user