Flipkart / recyclerlistview

High performance listview for React Native and web!
Apache License 2.0
5.17k stars 420 forks source link

fix: get blank area when scrolling #741

Closed alantoa closed 1 year ago

alantoa commented 1 year ago

Description

Hi maintainers! ๐Ÿ‘‹

this PR is for FlashList and recyclerlistview:

1. if contentContainerStyle prop has paddingTop or marginTop, will get blank area when swiping up scrollview.

Why

How

Test

Before

https://user-images.githubusercontent.com/37520667/186505022-218b66b2-dffc-460b-a44f-aa3c1502d165.mov

After

https://user-images.githubusercontent.com/37520667/186505208-eb048a8e-4c06-4251-8d22-0a1cd01a5646.mov

2. renderScrollComponent type warning.

so we can use PropTypes.oneOfType and add a PropTypes.object type to avoid it.

FYI: https://github.com/Flipkart/recyclerlistview/issues/233#issuecomment-499270292

naqvitalha commented 1 year ago

@alantoa RLV has an API called applyWindowCorrection that will allow you to handle all sorts of overlays or top padding. Have you looked into it? I don't think this PR is necessary. https://github.com/Flipkart/recyclerlistview#applywindowcorrection-usage

alantoa commented 1 year ago

@naqvitalha thanks for your review! ๐Ÿ™ I just checked it's my bad, I missed the docs, will close it! thanks again!