-
Notifications
You must be signed in to change notification settings - Fork 211
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
Clone option throws error with React v0.14.7 #2
Comments
I can reproduce the error as you mentioned. I think it might be caused by Sortable.js. I will try to figure out if it is possible to clone new nodes without copying the original |
I fixed this issue in the dev branch by checking if the group options of a remote Sortable component is set to if (remote !== this) {
if (typeof remote.props.group === 'object' && remote.props.group.pull === 'clone') {
// Remove the node with the same data-reactid
evt.item.parentNode.removeChild(evt.item);
}
: : :
} |
Fixed in v1.0.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I setup two sortable lists, and group them,
with one being set to
pull: 'clone'
As soon as I drag the element and drop it on the list with
put: true
,The receiving list updates with the new, cloned element as expected,
but the source list gets a duplicate copy of the dropped element, and then react throws the following error:
Uncaught Invariant Violation: ReactMount: Two valid but unequal nodes with the same 'data-reactid': .0.0.$5
This might be related to the unmerged fix here: SortableJS/Sortable#612
Just wondering if you're able to reproduce this, or if it's something with my setup.
Let me know if you need a jsfiddle
The text was updated successfully, but these errors were encountered: