@lodev09/react-native-true-sheet 3.8.1 → 3.8.2

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.
@@ -203,7 +203,7 @@ class TrueSheetViewController(private val reactContext: ThemedReactContext) :
203
203
  behavior?.isHideable = value
204
204
  }
205
205
 
206
- var draggable: Boolean = true
206
+ override var draggable: Boolean = true
207
207
  set(value) {
208
208
  field = value
209
209
  behavior?.isDraggable = value
@@ -25,6 +25,7 @@ interface TrueSheetBottomSheetViewDelegate {
25
25
  val sheetBackgroundColor: Int?
26
26
  val grabber: Boolean
27
27
  val grabberOptions: GrabberOptions?
28
+ val draggable: Boolean
28
29
  fun bottomSheetViewDidTapGrabber()
29
30
  }
30
31
 
@@ -158,14 +159,14 @@ class TrueSheetBottomSheetView(private val reactContext: ThemedReactContext) : F
158
159
  findViewWithTag<View>(GRABBER_TAG)?.let { removeView(it) }
159
160
 
160
161
  val isEnabled = delegate?.grabber ?: true
161
- val isDraggable = behavior?.isDraggable ?: true
162
+ val isDraggable = delegate?.draggable ?: true
162
163
  if (!isEnabled || !isDraggable) return
163
164
 
164
165
  val grabberView = TrueSheetGrabberView(reactContext, delegate?.grabberOptions).apply {
165
166
  tag = GRABBER_TAG
166
167
  }
167
168
 
168
- addView(grabberView, 0)
169
+ addView(grabberView)
169
170
  }
170
171
 
171
172
  // =============================================================================
@@ -93,7 +93,13 @@ using namespace facebook::react;
93
93
  return;
94
94
  }
95
95
 
96
- // Already set up with same inset
96
+ // Check if pinned scroll view is still valid (still in view hierarchy)
97
+ // This handles the case where content changes and the old scroll view is unmounted
98
+ if (_pinnedScrollView && ![_pinnedScrollView isDescendantOfView:self]) {
99
+ [self clearScrollable];
100
+ }
101
+
102
+ // Already set up with same inset and valid scroll view
97
103
  if (_pinnedScrollView && _bottomInset == bottomInset) {
98
104
  return;
99
105
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lodev09/react-native-true-sheet",
3
- "version": "3.8.1",
3
+ "version": "3.8.2",
4
4
  "description": "The true native bottom sheet experience for your React Native Apps.",
5
5
  "source": "./src/index.ts",
6
6
  "main": "./lib/module/index.js",