Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

renderScrollComponent prop of FlatList imported from react-native-gesture-handler does nothing and needs to be removed #2990

Closed
thisisgit opened this issue Jul 12, 2024 · 1 comment · Fixed by #3029
Labels
Missing repro Platform: iOS This issue is specific to iOS

Comments

@thisisgit
Copy link

Description

Hi,

I found that FlatList from RNGH accepts renderScrollComponent but it gets overwritten by its internal implementation

renderScrollComponent={(scrollProps) => (
<ScrollView
{...{
...scrollProps,
...scrollViewProps,
waitFor: [...toArray(waitFor ?? []), refreshControlGestureRef],
}}
/>
)}

Since it doesn't warn or notify user that this prop isn't supported, I think it's better to omit the prop just like what reanimated did to CellRendererComponent of Animated.FlatList.

Found this issue from kirillzyusko/react-native-keyboard-controller#505

Steps to reproduce

n/a

Snack or a link to a repository

n/a

Gesture Handler version

2.16.1

React Native version

0.74.2

Platforms

iOS

JavaScript runtime

Hermes

Workflow

Expo managed workflow

Architecture

Paper (Old Architecture)

Build type

Debug mode

Device

iOS simulator

Device model

No response

Acknowledgements

Yes

@github-actions github-actions bot added Platform: iOS This issue is specific to iOS Missing repro labels Jul 12, 2024
Copy link

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

j-piasecki added a commit that referenced this issue Sep 17, 2024
## Description

Closes
#2990

Removes `renderScrollComponent` from the public API of FlatList exported
by Gesture Handler, as its being overwritten with Gesture Handler's
scroll view anyway.

## Test plan

Verify that `renderScrollComponent` causes a TypeScript error on
FlatList exported from RNGH.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Missing repro Platform: iOS This issue is specific to iOS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant