Skip to content

Prevent moving an element after a filtered one #273

Closed

Description

@philipgiuliani

I have a list of images, where the last image can't be sorted (blocked by using the filter option). But what i can do is take another element, and move it after the filtered element. Is there any way to prevent that?

Would be cool to have a beforeEnd method, where i could check the position and revert it if its not allowed to.

Example: http://jsbin.com/bujonojoqi/1

Activity

  1. added
    enhancementQuality of life changes to existing features
    on Feb 12, 2015
  2. added this to the v1.2.0 milestone on Feb 12, 2015
  3. added a commit that references this issue on Apr 15, 2015
  4. RubaXa commented on Apr 15, 2015

    @RubaXa
    Collaborator
  5. philipgiuliani commented on Apr 15, 2015

    @philipgiuliani
    Author

    Really cool thanks! :) Thats exactly what i needed!

  6. RubaXa commented on Apr 15, 2015

    @RubaXa
    Collaborator

    Excellent! Try dev-branch.

  7. philipgiuliani commented on Apr 15, 2015

    @philipgiuliani
    Author

    I updated it now in my project and it works very well in my use-case! Thanks again :) Amazing work!

  8. dmetri333 commented on Jan 26, 2016

    @dmetri333

    This works great for a single list, but can it be done with multi lists?
    Seems to be an issue when one list has no more items (except for the static one), and your trying to add a item to it.

  9. dmetri333 commented on Jan 26, 2016

    @dmetri333

    So i played around with it for a bit, and it turns out if you return -1 on "onMove" every time it will behave how i want it to.....odd

  10. codingfriend1 commented on Sep 14, 2016

    @codingfriend1

    This solution doesn't seem to work with ng-sortable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementQuality of life changes to existing features

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions