File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
docs/versioned_docs/version-1.17.0/api/components Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -124,7 +124,8 @@ Unlike original [react-native-keyboard-aware-scroll-view](https://github.com/APS
124124If you want to integrate it with your custom virtualization list, you can pass ` renderScrollComponent ` prop like:
125125
126126``` tsx
127- import { FlatList } from " react-native" ;
127+ import React from " react" ;
128+ import { FlatList , ScrollView , ScrollViewProps } from " react-native" ;
128129import { KeyboardAwareScrollView } from " react-native-keyboard-controller" ;
129130
130131<FlatList
@@ -135,9 +136,11 @@ import { KeyboardAwareScrollView } from "react-native-keyboard-controller";
135136
136137import { FlashList } from " @shopify/flash-list" ;
137138
138- <FlashList
139- renderScrollComponent = { (props ) => <KeyboardAwareScrollView { ... props } />}
140- />;
139+ const RenderScrollComponent = React .forwardRef <ScrollView , ScrollViewProps >(
140+ (props , ref ) => <KeyboardAwareScrollView { ... props } ref = { ref } />,
141+ );
142+
143+ <FlashList renderScrollComponent = { RenderScrollComponent } />;
141144```
142145
143146<details >
You can’t perform that action at this time.
0 commit comments