File tree 2 files changed +14
-8
lines changed
versioned_docs/version-1.16.0/api/components
2 files changed +14
-8
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
124
124
If you want to integrate it with your custom virtualization list, you can pass ` renderScrollComponent ` prop like:
125
125
126
126
``` tsx
127
- import { FlatList } from " react-native" ;
127
+ import React from " react" ;
128
+ import { FlatList , ScrollView , ScrollViewProps } from " react-native" ;
128
129
import { KeyboardAwareScrollView } from " react-native-keyboard-controller" ;
129
130
130
131
<FlatList
@@ -135,9 +136,11 @@ import { KeyboardAwareScrollView } from "react-native-keyboard-controller";
135
136
136
137
import { FlashList } from " @shopify/flash-list" ;
137
138
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 } />;
141
144
```
142
145
143
146
<details >
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
124
124
If you want to integrate it with your custom virtualization list, you can pass ` renderScrollComponent ` prop like:
125
125
126
126
``` tsx
127
- import { FlatList } from " react-native" ;
127
+ import React from " react" ;
128
+ import { FlatList , ScrollView , ScrollViewProps } from " react-native" ;
128
129
import { KeyboardAwareScrollView } from " react-native-keyboard-controller" ;
129
130
130
131
<FlatList
@@ -135,9 +136,11 @@ import { KeyboardAwareScrollView } from "react-native-keyboard-controller";
135
136
136
137
import { FlashList } from " @shopify/flash-list" ;
137
138
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 } />;
141
144
```
142
145
143
146
<details >
You can’t perform that action at this time.
0 commit comments