Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Cannot get it to save first sort, all other sorts save just fine.  #358

Closed
@EmptyPockets

Description

@EmptyPockets

I'm using ui-sortable with firebase/angularfire to save the data. Here's my setup:

//set options for ui-sortable
$scope.sortableOptions = {
stop: function(event, ui) {
$scope.userList.forEach(function(todo){
todo.sort = $scope.userList.indexOf(todo);
$scope.userList.$save(todo);
});
},
axis: 'y'
}

//the html is like in the example



  • {{task.title}}

When I try to sort the first time, everything will move back to its original position. If I try to sort again after that everything works great. Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions