Skip to content

Not working with nested component #585

@ChocolateLoverRaj

Description

@ChocolateLoverRaj

The following code should work, but the rendered element is not draggable:

<Draggable nodeRef={ref1}>
  <Component1 ref={ref1} />
</Draggable>

Link to reproducible example: https://codesandbox.io/s/react-draggable-bug-o4g5c?file=/src/App.js

The following example's controlled position doesn't work: https://codesandbox.io/s/react-draggable-bug-2-hy4iz

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions