Skip to content

Warning: ref.measureLayout must be called with a node handle.Β #543

@Krishna2323

Description

@Krishna2323

Describe the bug

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

Platform & Dependencies
Please list any applicable dependencies in addition to those below (react-navigation etc).

  • react-native-draggable-flatlist version: "^4.0.1"
  • Platform: Android
  • React Native or Expo version: "0.73.4"
  • Reanimated version: "^3.8.0"
  • React Native Gesture Handler version: "2.14.1

Additional context
Discussion in react-native-web

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions