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

Model not updating when using nested components #42

Closed
szmarci opened this issue Dec 12, 2016 · 4 comments
Closed

Model not updating when using nested components #42

szmarci opened this issue Dec 12, 2016 · 4 comments

Comments

@szmarci
Copy link

szmarci commented Dec 12, 2016

I have two nested components and when I drag one inner component to another outer component, only the view updating (with DOM manipulation I guess), the model stays the same.
How can I make the model update?

@David-Desmaisons
Copy link
Member

Please create a fidle.
Thanks

@David-Desmaisons
Copy link
Member

And use version 2.5.0-rc0 which contains fix for nested component.

@szmarci
Copy link
Author

szmarci commented Dec 13, 2016

I created a Fiddle: http://jsfiddle.net/ny7a5a3y/7/

I couldn't find the newest version on a CDN, so I embedded it into the javascript pane in the fiddle, my code will be at the very bottom of that page.

If you add a task with the button you can see the data model on the right reflect the changes.
But if you drag a sub item to another parent, then it does nothing. And also if you drag it within its parent it does nothing. Why is that?

Thanks!

@David-Desmaisons
Copy link
Member

David-Desmaisons commented Dec 13, 2016

Hi @szmarci , You forgot to set the list prop on the draggable component. Without this prop set, draggbale is not performing any synchronization.
Correct fiddle here: http://jsfiddle.net/dede89/bvjfa9xk/

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