Skip to content

[bug] Removing items while dragging causes multiple issues #188

Description

@wdoug

Describe the bug
When you are dragging an item, if the list prop is updated such that it should remove the element you are dragging we have seen multiple bugs:

  1. The element dragging should be removed, but it consistently wasn't
  2. Multiple JavaScript errors were frequently thrown

To Reproduce
Steps to reproduce the behavior:

  1. Have a list of sortable elements in the <ReactSortableJS /> component
  2. Start dragging an element
  3. While you're dragging, have an event trigger updating the list prop so that the element you are dragging should be removed

Expected behavior
The element you are dragging should be removed with no errors thrown and the state of things continuing to work properly

Information
This is required. Issues without this critical information will be closed.

Versions - Look in your package.json for this information:
react-sortablejs = 6.0.0 (also had seen this same behavior with an earlier version)
react = 16.9.0

Additional context
Hoping to set up a codesandbox example at some point, just wanted to start the conversation here first

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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