@swmansion/react-native-bottom-sheet 0.8.3-next.1 → 0.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -443,9 +443,15 @@ public final class RNSBottomSheetHostingView: UIView {
443
443
  })?.offset ?? targetIndex
444
444
  }
445
445
 
446
+ private func isVerticallyScrollable(_ scrollView: UIScrollView) -> Bool {
447
+ let verticalInset = scrollView.adjustedContentInset.top + scrollView.adjustedContentInset.bottom
448
+ let visibleHeight = max(0, scrollView.bounds.height - verticalInset)
449
+ return scrollView.alwaysBounceVertical || scrollView.contentSize.height > visibleHeight
450
+ }
451
+
446
452
  private func firstScrollView(in view: UIView) -> UIScrollView? {
447
453
  for subview in view.subviews {
448
- if let scrollView = subview as? UIScrollView {
454
+ if let scrollView = subview as? UIScrollView, isVerticallyScrollable(scrollView) {
449
455
  return scrollView
450
456
  }
451
457
  if let found = firstScrollView(in: subview) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swmansion/react-native-bottom-sheet",
3
- "version": "0.8.3-next.1",
3
+ "version": "0.8.3",
4
4
  "description": "Provides bottom-sheet components for React Native.",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",