File tree Expand file tree Collapse file tree
android/src/main/java/com/reactnativekeyboardcontroller/views
src/components/KeyboardAwareScrollView Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,10 +24,10 @@ class ClippingScrollViewDecoratorView(
2424 }
2525
2626 private fun decorateScrollView () {
27- val scrollView = getChildAt(0 ) as ? ScrollView
27+ val scrollView = getChildAt(0 ) as ? ScrollView ? : return
2828
29- scrollView? .clipToPadding = false
30- scrollView? .setPadding(
29+ scrollView.clipToPadding = false
30+ scrollView.setPadding(
3131 scrollView.paddingLeft,
3232 scrollView.paddingTop,
3333 scrollView.paddingRight,
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ import ScrollViewWithBottomPadding from "../ScrollViewWithBottomPadding";
2929import { useSmoothKeyboardHandler } from "./useSmoothKeyboardHandler" ;
3030import { debounce , scrollDistanceWithRespectToSnapPoints } from "./utils" ;
3131
32+ import type { AnimatedScrollViewComponent } from "../ScrollViewWithBottomPadding" ;
3233import type {
3334 LayoutChangeEvent ,
3435 ScrollView ,
@@ -50,7 +51,7 @@ export type KeyboardAwareScrollViewProps = {
5051 /** Adjusting the bottom spacing of KeyboardAwareScrollView. Default is `0`. */
5152 extraKeyboardSpace ?: number ;
5253 /** Custom component for `ScrollView`. Default is `ScrollView`. */
53- ScrollViewComponent ?: React . ComponentType < ScrollViewProps > ;
54+ ScrollViewComponent ?: AnimatedScrollViewComponent ;
5455} & ScrollViewProps ;
5556export type KeyboardAwareScrollViewRef = {
5657 assureFocusedInputVisible : ( ) => void ;
You can’t perform that action at this time.
0 commit comments