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

Connecting two lists #230

Closed
kraftwer1 opened this issue Jul 13, 2015 · 2 comments
Closed

Connecting two lists #230

kraftwer1 opened this issue Jul 13, 2015 · 2 comments

Comments

@kraftwer1
Copy link
Contributor

Does anybody know if it's possible to connect two lists (and maybe has a working example for it)?
My app:

<Container>
    <List>
        <Item id="1"></Item>
        <Item id="2"></Item>
    </List>
    <List>
        <Item id="3"></Item>
        <Item id="4"></Item>
    </List>
<Container>

Now I'd like to drag the first item of the first list to the second list.
That means, when I use setState(), I'll have to remove an item from the first list and add it to the second list (to the index to where the user has dropped it). Right now, I'm getting a lot of errors when I do that (encountered two children with the same key...).

Note: I'm not looking for debugging my app, I'm just asking if this is even possible.

@gaearon
Copy link
Member

gaearon commented Jul 13, 2015

Definitely possible, see #227.
It has an example (slightly broken one, but I explain how to fix it in the issue).

@kraftwer1
Copy link
Contributor Author

Thanks a lot, the example helped me to solve the issue.

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

2 participants