Skip to content

"Placeholder" #591

@knospe-

Description

@knospe-

Hello,

I have a question regarding "placeholders". Do I have to set some sort of group attribute to enable that the group has a placeholder in case all the items are removed from this group?
I'm using elements of one table as a group and "tr"s as group elements.

For example if I have two groups, A and B, and I can move items from one group to another. And if I move all items from group A to B, (group A is now empty) but than decide to move some items back from B to A, I cannot do this anymore. It is like that group A is not active anymore.

I've created a JSFiddle that demonstrates this:
http://jsfiddle.net/knospe/aqgfnx2b/2/

When you move the element from "EUR Warenkorb" to "Bonuspunkte Warenkorb" you cannot add anything back to "EUR Warenkorb".

My solution for this would be adding a placeholder element, when the list is empty (-> checkSortableCart function). But then I have a problem that also this placeholder element should be of class .items and so it also could be moved to another list.
I have noticed the same behaviour by the first example (List A, List B) at http://rubaxa.github.io/Sortable/

For some reason do groups in the second example "Multi" accept items after all the items have been removed from them.

Could anyone please explain to me why the difference in behaviour of groups?

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