Skip to content

Commit b7a0764

Browse files
authored
fix(ios): remove hardcoded recycle (#1043)
1 parent 40bdda8 commit b7a0764

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ios/RNCPagerViewComponentView.mm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ -(void)prepareForRecycle {
130130
[super prepareForRecycle];
131131
_nativePageViewController = nil;
132132
_currentIndex = -1;
133-
_scrollEnabled = YES;
134133
}
135134

136135
- (void)shouldDismissKeyboard:(RNCViewPagerKeyboardDismissMode)dismissKeyboard {
@@ -161,6 +160,8 @@ - (void)updateProps:(const facebook::react::Props::Shared &)props oldProps:(cons
161160
if (_currentIndex == -1) {
162161
_currentIndex = newScreenProps.initialPage;
163162
[self shouldDismissKeyboard: newScreenProps.keyboardDismissMode];
163+
_scrollEnabled = newScreenProps.scrollEnabled;
164+
[self applyScrollEnabled];
164165
}
165166

166167
const auto newLayoutDirectionStr = RCTNSStringFromString(toString(newScreenProps.layoutDirection));

0 commit comments

Comments
 (0)