TextInput: textInputShouldEndEditing and textInputDidEndEditing were moved to base class
Reviewed By: mmmulani Differential Revision: D5395925 fbshipit-source-id: 0c67beccd74d981ab2a89f9cb31990301793b408
This commit is contained in:
parent
a50c9c8e22
commit
f89e132719
|
@ -137,24 +137,4 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithCoder:(NSCoder *)aDecoder)
|
||||||
eventCount:_nativeEventCount];
|
eventCount:_nativeEventCount];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)textInputShouldEndEditing
|
|
||||||
{
|
|
||||||
return YES;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)textInputDidEndEditing
|
|
||||||
{
|
|
||||||
[_eventDispatcher sendTextEventWithType:RCTTextEventTypeBlur
|
|
||||||
reactTag:self.reactTag
|
|
||||||
text:self.text
|
|
||||||
key:nil
|
|
||||||
eventCount:_nativeEventCount];
|
|
||||||
|
|
||||||
[_eventDispatcher sendTextEventWithType:RCTTextEventTypeEnd
|
|
||||||
reactTag:self.reactTag
|
|
||||||
text:_backedTextInput.text
|
|
||||||
key:nil
|
|
||||||
eventCount:_nativeEventCount];
|
|
||||||
}
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -56,5 +56,7 @@
|
||||||
- (BOOL)textInputShouldReturn;
|
- (BOOL)textInputShouldReturn;
|
||||||
- (void)textInputDidReturn;
|
- (void)textInputDidReturn;
|
||||||
- (void)textInputDidChangeSelection;
|
- (void)textInputDidChangeSelection;
|
||||||
|
- (BOOL)textInputShouldEndEditing;
|
||||||
|
- (void)textInputDidEndEditing;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -146,6 +146,26 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithFrame:(CGRect)frame)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (BOOL)textInputShouldEndEditing
|
||||||
|
{
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)textInputDidEndEditing
|
||||||
|
{
|
||||||
|
[_eventDispatcher sendTextEventWithType:RCTTextEventTypeEnd
|
||||||
|
reactTag:self.reactTag
|
||||||
|
text:self.backedTextInputView.text
|
||||||
|
key:nil
|
||||||
|
eventCount:_nativeEventCount];
|
||||||
|
|
||||||
|
[_eventDispatcher sendTextEventWithType:RCTTextEventTypeBlur
|
||||||
|
reactTag:self.reactTag
|
||||||
|
text:self.backedTextInputView.text
|
||||||
|
key:nil
|
||||||
|
eventCount:_nativeEventCount];
|
||||||
|
}
|
||||||
|
|
||||||
#pragma mark - Content Size (in Yoga terms, without any insets)
|
#pragma mark - Content Size (in Yoga terms, without any insets)
|
||||||
|
|
||||||
- (CGSize)contentSize
|
- (CGSize)contentSize
|
||||||
|
|
|
@ -373,26 +373,6 @@ static BOOL findMismatch(NSString *first, NSString *second, NSRange *firstRange,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)textInputShouldEndEditing
|
|
||||||
{
|
|
||||||
return YES;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)textInputDidEndEditing
|
|
||||||
{
|
|
||||||
[_eventDispatcher sendTextEventWithType:RCTTextEventTypeEnd
|
|
||||||
reactTag:self.reactTag
|
|
||||||
text:_backedTextInput.text
|
|
||||||
key:nil
|
|
||||||
eventCount:_nativeEventCount];
|
|
||||||
|
|
||||||
[_eventDispatcher sendTextEventWithType:RCTTextEventTypeBlur
|
|
||||||
reactTag:self.reactTag
|
|
||||||
text:nil
|
|
||||||
key:nil
|
|
||||||
eventCount:_nativeEventCount];
|
|
||||||
}
|
|
||||||
|
|
||||||
#pragma mark - UIScrollViewDelegate
|
#pragma mark - UIScrollViewDelegate
|
||||||
|
|
||||||
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
|
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
|
||||||
|
|
Loading…
Reference in New Issue