Skip to content

[Bug] dropTargets is empty in location.current on edge cases #234

@crabvk

Description

@crabvk

Hi. Thank you for the great library. Here's one bug I found:
I took the List example from the examples page and have added margin to the containerStyles object and the call to alert when target is not in the array to demonstrate the issue:

return monitorForElements({
      onDrop({ location, source }) {
        const target = location.current.dropTargets[0];
        if (!target) {
          alert("Here is the issue!"); // <=== Added this.
          return;
        }
// ...

Here's my demo:

demo.mp4

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