-
Notifications
You must be signed in to change notification settings - Fork 4
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
Not working with flat list #6
Comments
After a lot of testing I managed to solve this by calling import {FlatList, ScrollView} from 'react-native-gesture-handler'
import {useRegisterScroller} from '@nandorojo/anchor'
const {registerScrollRef} = useRegisterScroller()
<FlatList
ref={list => registerScrollRef(list?.getNativeScrollRef() as ScrollView)}
// ...
/> |
Hmm interesting we could implement this in the library |
It would be great, if I could achieve the same result with SectionList |
I'm curious if the anchoring logic still works when the list item has not yet been rendered by the FlatList? Does anyone face this issue? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi sir, thanks for your work !
It seems that there is an issue with FlatList, I got an error ref.measureLayout must be called with a node handle or a ref to a native component.
Here is my code :
"react-native": "0.71.0"
Thanks for your help !
The text was updated successfully, but these errors were encountered: