Famous / famous-angular

Bring structure to your Famo.us apps with the power of AngularJS. Famo.us/Angular integrates seamlessly with existing Angular and Famo.us apps.
https://famo.us/angular
Mozilla Public License 2.0
1.92k stars 276 forks source link

Problems with ng-repeat in Layout #342

Closed janober closed 9 years ago

janober commented 9 years ago

I wanted to make the content in a Sequential-Layout (or other similars) sortable. However I am totally unable to get it working. Somehow the data does not update correctly.

I created that simple codepen to demonstrate: http://codepen.io/anon/pen/EaQbxy

When the button "move down" gets pressed the entry should simply move down one position. But that does not work when I have the ng-repeat on the modifier. However works totally fine when I do it on a div (code is also in there, can simply get uncommented and the famous-angular one commented out).

Thanks!

atgillette commented 9 years ago

I've seen the same issue with fa-grid-layout, http://plnkr.co/edit/TGQqurdw5ZJbwlRRUaGE?p=preview.

atgillette commented 9 years ago

I came across a fix to this issue #293 using fa-index and have updated the plnkr example.

janober commented 9 years ago

Great to hear that you found a solution & thanks for posting it!

However just tried if that also works for my issue but it does sadly not.

zackbrown commented 9 years ago

Hey @janober , I agree that this sounds like an issue that could be solved with fa-index--it sounds like something else may be going on, though. Without more detail, it's difficult to offer support. Can you create a codepen that reproduces the error you're encountering?

janober commented 9 years ago

Hello @zackbrown , there is already a code pen which shows my issue. It is above in my original issue. However forked it and added the fa-index. That version can be found here: http://codepen.io/anon/pen/qEoYZY

Thanks!

zackbrown commented 9 years ago

It was a bug in fa-sequential-layout. (the 'update' function was not specified for fa-sequential-layout like it should be, and as it is with fa-grid-layout, fa-scroll-view, etc.) I updated your codepen with a build of master and now it works as expected. See http://codepen.io/zackbrown/pen/RNMzOB . The commit for this fix is 25dd0403f5e37dd4906ed4e371f15228fc341504 .

janober commented 9 years ago

Great Zack! And Thanks a lot like always. Works now perfectly like you said.

Closing...