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

ListView does not support contentOffset #2146

Closed
Zygro opened this issue Jul 28, 2015 · 2 comments
Closed

ListView does not support contentOffset #2146

Zygro opened this issue Jul 28, 2015 · 2 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@Zygro
Copy link

Zygro commented Jul 28, 2015

I don't know if it's supposed to or not, but either way it doesn't work for me.

I would like for the ListView to begin on the border of these two sections, but no matter what I put as offset (other than 0,0), there is error:

"Error setting property 'alwaysBounceVertical' of RCTScrollView with tag #8: Sticky header index 0 was outside range {0,0}"

If I try to set alwaysBounceVertical, either true or false will make the offset 0,0. If I don't set it, I get this error.
I think that setting initial section would be great feature, or at least being able to set offset manually.

@felixakiragreen
Copy link
Contributor

There is a bug (#1878 (comment)) where if the content's height is taller than the ScrollView (which wraps the ListView) then contentOffset will not work.

I found a workaround by mounting my list view with one row, then adding more when the data loaded in.

@ide
Copy link
Contributor

ide commented Aug 5, 2015

Setting contentOffset is going to set you up for a world of pain in nearly all cases because of the multithreaded nature of RN... Does scrollWithoutAnimationTo meet your use case?

@facebook facebook locked as resolved and limited conversation to collaborators Jul 22, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

5 participants