mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-10 01:15:00 +08:00
Fixed onScroll prop in mulitline TextInput (#23668)
Summary: We lose the support of `onScroll` prop for multiline TextInput, let's add it again. [iOS] [Fixed] - Fixed onScroll prop in mulitline TextInput Pull Request resolved: https://github.com/facebook/react-native/pull/23668 Differential Revision: D14253996 Pulled By: cpojer fbshipit-source-id: 43ed191e18fdb716f6c53be3bf0f59f917b34b59
This commit is contained in:
committed by
Facebook Github Bot
parent
abb82c472d
commit
3b3e6a0eb3
@@ -27,6 +27,10 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
- (void)textInputDidChangeSelection;
|
||||
|
||||
@optional
|
||||
|
||||
- (void)scrollViewDidScroll:(UIScrollView *)scrollView;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@@ -213,6 +213,15 @@ static void *TextFieldSelectionObservingContext = &TextFieldSelectionObservingCo
|
||||
[self textViewProbablyDidChangeSelection];
|
||||
}
|
||||
|
||||
#pragma mark - UIScrollViewDelegate
|
||||
|
||||
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
|
||||
{
|
||||
if ([_backedTextInputView.textInputDelegate respondsToSelector:@selector(scrollViewDidScroll:)]) {
|
||||
[_backedTextInputView.textInputDelegate scrollViewDidScroll:scrollView];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Public Interface
|
||||
|
||||
- (void)skipNextTextInputDidChangeSelectionEventWithTextRange:(UITextRange *)textRange
|
||||
|
||||
Reference in New Issue
Block a user