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.

Items added outside ng-repeat #177

@AlexCuse

Description

@AlexCuse

We have a kind of funny use case where we want to list items (sortable) using ng-repeat, but then add a "footer" item with controls to add items and such. We are trying to use the "items" option and a marker class to accomplish fixing items in place, eg { items: ':not(.pinned)' }

What I'm seeing is that if I add the pinned class via ng-class inside ng-repeat it works as I'd expect - the pinned item cannot be moved : http://codepen.io/anon/pen/Enfte

What I want however is to add a pinned row in my markup outside ng-repeat, eg http://codepen.io/anon/pen/KHlgB

When going this route the last item is draggable, but on drop it snaps into its original position - so the items selector seems to be at least partly effective. It also adds an empty item at the drop position that then remains fixed there (again draggable but not droppable). Subsequent actions do not add additional items.

I am far from an expert on angular so please forgive me if I am doing something stupid here. Just figured I would raise the issue before we start down the road of accomplishing the same visual effect with CSS hackery.

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