Skip to content

Commit 6511a27

Browse files
committed
fix: add setPagingEnabled to RCTScrollView
This prevents an error in the "Animated - Gratuitous App" section of RNTester.
1 parent 06ee4a2 commit 6511a27

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

React/Views/ScrollView/RCTScrollView.m

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -667,6 +667,14 @@ - (type)getter \
667667
return [_scrollView getter]; \
668668
}
669669

670+
- (void)setPagingEnabled:(__unused BOOL)pagingEnabled
671+
{
672+
if (!pagingEnabled) {
673+
// Paging is always enabled on macOS.
674+
RCTLogError(@"[RCTScrollView pagingEnabled] cannot be false");
675+
}
676+
}
677+
670678
- (void)sendScrollEventWithName:(NSString *)eventName
671679
scrollView:(NSScrollView *)scrollView
672680
userData:(NSDictionary *)userData

0 commit comments

Comments
 (0)