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.

Fix implementation of callbacks (update/stop) #27

Closed
@thgreasi

Description

@thgreasi

This fiddle demonstrates some weird behavior with the callbacks provided to the sortable-options object.

  • The $scope.model inside the update callback is not the new one, but the old one.
  • The $scope.model inside the stop callback is the new one, but stop occurs after apply()

The only solution that I came up is: define a callback for stop, process the new data and call $scope.apply().

I think that the point of a callback, is to provide a way to respond to an event and
possibly process any changes that happened.
Those model-changes/new-model-state are not provided in any way in the current implementation.
(Obviously, nobody should have to call apply())

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions