mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-12 11:40:33 +08:00
TextInput: Unified support of clearTextOnFocus prop
Summary: The implementation of `clearTextOnFocus` was unified and moved to baseclass. Reviewed By: javache Differential Revision: D5299489 fbshipit-source-id: ff166f9bb0673ff8766f20b677f56810f64d7b2d
This commit is contained in:
committed by
Facebook Github Bot
parent
cb96f1d5d2
commit
d69e60bb7a
@@ -329,19 +329,6 @@ static NSAttributedString *removeReactTagFromString(NSAttributedString *string)
|
||||
}
|
||||
}
|
||||
|
||||
- (void)textInputDidBeginEditing
|
||||
{
|
||||
if (_clearTextOnFocus) {
|
||||
_backedTextInput.text = @"";
|
||||
}
|
||||
|
||||
[_eventDispatcher sendTextEventWithType:RCTTextEventTypeFocus
|
||||
reactTag:self.reactTag
|
||||
text:nil
|
||||
key:nil
|
||||
eventCount:_nativeEventCount];
|
||||
}
|
||||
|
||||
static BOOL findMismatch(NSString *first, NSString *second, NSRange *firstRange, NSRange *secondRange)
|
||||
{
|
||||
NSInteger firstMismatch = -1;
|
||||
|
||||
Reference in New Issue
Block a user