mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
RCTTextField was spliited into two classes
Summary: Motivation: * We maintain two different implementation of <TextInput> (multilined and singlelined), this change makes the implementations much similar which will help us to support and improve both of them in the (near) future; * We have to have separated RCTView-based container view for (TextField) to support sofisticated bordering and so on; * It opens to us possibility to unify UITextView and UITextField subclasses and remove code duplication across RCTTextView and RCTTextField; * Making things decoupled in general will allow us to fix existing bugs with events. Reviewed By: mmmulani Differential Revision: D5083010 fbshipit-source-id: 2f2d42c2244d2b39256c51480c1f16f4e3947c01
This commit is contained in:
committed by
Facebook Github Bot
parent
48650226e8
commit
e13b9c6e49
@@ -10,15 +10,16 @@
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import <React/RCTComponent.h>
|
||||
#import <React/RCTView.h>
|
||||
|
||||
@class RCTBridge;
|
||||
@class RCTUITextField;
|
||||
|
||||
@interface RCTTextField : UITextField
|
||||
@interface RCTTextField : RCTView
|
||||
|
||||
@property (nonatomic, assign) BOOL caretHidden;
|
||||
@property (nonatomic, assign) BOOL selectTextOnFocus;
|
||||
@property (nonatomic, assign) BOOL blurOnSubmit;
|
||||
@property (nonatomic, strong) UIColor *placeholderTextColor;
|
||||
@property (nonatomic, assign) NSInteger mostRecentEventCount;
|
||||
@property (nonatomic, strong) NSNumber *maxLength;
|
||||
@property (nonatomic, assign) UIEdgeInsets reactPaddingInsets;
|
||||
@@ -26,6 +27,11 @@
|
||||
|
||||
@property (nonatomic, copy) RCTDirectEventBlock onSelectionChange;
|
||||
|
||||
@property (nonatomic, strong) RCTUITextField *textField;
|
||||
|
||||
- (instancetype)initWithBridge:(RCTBridge *)bridge NS_DESIGNATED_INITIALIZER;
|
||||
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
- (instancetype)initWithFrame:(CGRect)frame NS_UNAVAILABLE;
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user