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

Controlled Component Not Deleting Dragged Item #30

Closed
thewebsitedev opened this issue Feb 21, 2017 · 8 comments
Closed

Controlled Component Not Deleting Dragged Item #30

thewebsitedev opened this issue Feb 21, 2017 · 8 comments

Comments

@thewebsitedev
Copy link

Hi there,

I just tried the example on my local machine and the controlled component does not seem to work. The dragged item gets added back to the original list.

Sortable JS - 1.5.0
React Sortable JS - 1.3.0

@thewebsitedev
Copy link
Author

Okay, I just uninstalled sortable 1.5.0 and installed 1.5.0-rc1. Now it works fine! But why it won't work with latest release? :(

@cheton
Copy link
Collaborator

cheton commented Feb 22, 2017

Thank you for reporting this issue. I will try to find out what made differences between 1.5.0-rc1 and 1.5.0.

@cheton
Copy link
Collaborator

cheton commented Feb 22, 2017

I tested the uncontrolled component example and found some changes between 1.5.0-rc1 and 1.5.0. The pulled items still remained in the DOM tree. I will create an issue there to clarify if this is a breaking change or bug.

Configuration

Left

{
  group: {
    name: 'clone1',
    pull: true,
    put: false
  }
}

Right

{
  group: {
    name: 'clone1',
    pull: false,
    put: true
  }
}

image

Drag Apple and Banana from left to right

image

1.5.0-rc1

image

1.5.0

The pull items are still remaining in the DOM tree.

image

@cheton
Copy link
Collaborator

cheton commented Feb 22, 2017

See SortableJS/Sortable#1046

@thewebsitedev
Copy link
Author

Awesome! Hope it gets fixed soon.

@cheton
Copy link
Collaborator

cheton commented Feb 23, 2017

It's been fixed in its master branch. Please still stay with 1.5.0-rc1 before a newer version of Sortable.js being published.

@cheton
Copy link
Collaborator

cheton commented Feb 24, 2017

sortablejs 1.5.1 contains the bug fix of this issue.

@cheton cheton closed this as completed Feb 24, 2017
@thewebsitedev
Copy link
Author

Cool, thanks!

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

No branches or pull requests

2 participants