@sdcx/bottom-sheet 0.5.0 → 0.6.0

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.
package/README.md CHANGED
@@ -65,7 +65,7 @@ const App = () => {
65
65
 
66
66
  - `'hidden'`,隐藏状态,此时 BottomSheet 的高度为 0。
67
67
 
68
- - `fitToContents`,是指 BottomSheet 在展开时,是否适应内容的高度,默认是 `false`。
68
+ - `fitToContents`,是指 BottomSheet 在展开时,是否适应内容的高度,默认是 `false`。当和可滚动列表,譬如 ScrollView 一起使用时,请保持默认值。
69
69
 
70
70
  ### 回调
71
71
 
@@ -170,7 +170,7 @@ public class BottomSheet extends ReactViewGroup implements NestedScrollingParent
170
170
  @VisibleForTesting
171
171
  View findScrollingChild(View view) {
172
172
  if (ViewCompat.isNestedScrollingEnabled(view)) {
173
- if (!view.canScrollHorizontally(1) && !view.canScrollHorizontally(-1)) {
173
+ if (!view.canScrollHorizontally(1) && !view.canScrollHorizontally(-1) && (view.canScrollVertically(-1) || view.canScrollVertically(1))) {
174
174
  return view;
175
175
  }
176
176
  }
@@ -187,6 +187,7 @@ public class BottomSheet extends ReactViewGroup implements NestedScrollingParent
187
187
  }
188
188
  }
189
189
  }
190
+
190
191
  return null;
191
192
  }
192
193
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sdcx/bottom-sheet",
3
3
  "description": "A react-native BottomSheet component.",
4
- "version": "0.5.0",
4
+ "version": "0.6.0",
5
5
  "main": "./lib/index.js",
6
6
  "typings": "./lib/index.d.ts",
7
7
  "react-native": "src/index",