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

fix: warning - ref.measureLayout must be called with a node handle. #544

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Krishna2323
Copy link

Issue

When a new list item is added in NestableDraggableFlatList we get the warning Warning: ref.measureLayout must be called with a node handle or a ref to a native component.

This happens because we are using findNodeHandle and this PR in react-native now allows measureLayout to be passed a ref and throw the warning if node is passed.

const nodeHandle = findNodeHandle(scrollableRef.current);

containerRef.current.measureLayout(nodeHandle, onSuccess, onFail);

Demo

340080842-d9cafd74-479f-4ec5-abfa-7cc51a51138e.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant