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

React mixin clone error #448

Closed
bismark64 opened this issue Jun 24, 2015 · 5 comments
Closed

React mixin clone error #448

bismark64 opened this issue Jun 24, 2015 · 5 comments

Comments

@bismark64
Copy link

Hi guys, I'm using this wonderful library but I'm having some issues with the group clone option.

This is an excerpt from the code:

var CouponList = React.createClass({
  mixins: [SortableMixin],

  sortableOptions: {
    group: {
      name: 'organize',
      pull: 'clone'
    },
    animation: 200,
    ghostClass: 'sortable-ghost'
  },
});

and

var BookCategoryDiscounts = React.createClass({
  mixins: [SortableMixin],

  sortableOptions: {
    group: 'organize',
    animation: 200,
    ghostClass: 'sortable-ghost',
    filter: '.btn-danger'
  },
});

After dropping an item from the first list into the second one I get this:

Uncaught Error: Invariant Violation: ReactMount: Two valid but unequal nodes with the same `data-reactid`:

this is because there are 2 duplicate items in the first list (same data-reactid) and of course the 'cloned' item in the second..

Sorry I'm newbie, what am I doing wrong?

@ChiefORZ
Copy link
Contributor

You are not a newbie. This reaction wasn't considered by making the mixin, i think. I will take a look at it, maybe it is fixed easily.

@bismark64
Copy link
Author

Thank you @ChiefORZ, that would help me a lot!

@RubaXa
Copy link
Collaborator

RubaXa commented Sep 9, 2015

Create example on jsbin.com (draft)

@RubaXa RubaXa added the react label Sep 9, 2015
@ChiefORZ
Copy link
Contributor

ChiefORZ commented Sep 9, 2015

here you go http://jsbin.com/vaqolejixi/edit?js,output

@RubaXa
Copy link
Collaborator

RubaXa commented Jul 4, 2016

Dear all! Meteor is moved to the separate repository. If this issue is still actual, please create it there once again and this rojects needs a maintainer:

@RubaXa RubaXa closed this as completed Jul 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants