From 73008943c5c19e98c254dda17004737bf69e2ec0 Mon Sep 17 00:00:00 2001 From: Daryl Rowland Date: Thu, 9 Apr 2015 10:33:20 +0100 Subject: [PATCH 1/2] Added support for textAlign to TextInput Added remapping of style textAlign property to textAlignment (which is the name of the same property on text input components) --- React/Views/RCTTextFieldManager.m | 1 + 1 file changed, 1 insertion(+) diff --git a/React/Views/RCTTextFieldManager.m b/React/Views/RCTTextFieldManager.m index 041474643dbdcd..6e3d2aecd0bf20 100644 --- a/React/Views/RCTTextFieldManager.m +++ b/React/Views/RCTTextFieldManager.m @@ -34,6 +34,7 @@ - (UIView *)view RCT_EXPORT_VIEW_PROPERTY(secureTextEntry, BOOL) 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)]; From 7b9ba9c47b20709cb28acbffd610dc0de42c6144 Mon Sep 17 00:00:00 2001 From: Daryl Rowland Date: Thu, 9 Apr 2015 15:25:11 +0100 Subject: [PATCH 2/2] Exposed textAlign in TextInput.js Exposed textAlign in TextInput.js. Hopefully this is all that is needed? --- Libraries/Components/TextInput/TextInput.js | 1 + 1 file changed, 1 insertion(+) diff --git a/Libraries/Components/TextInput/TextInput.js b/Libraries/Components/TextInput/TextInput.js index dc29af70af5b1d..0645988a2cac52 100644 --- a/Libraries/Components/TextInput/TextInput.js +++ b/Libraries/Components/TextInput/TextInput.js @@ -52,6 +52,7 @@ var RCTTextViewAttributes = merge(ReactIOSViewAttributes.UIView, { placeholder: true, placeholderTextColor: true, text: true, + textAlign: true }); var RCTTextFieldAttributes = merge(RCTTextViewAttributes, {