Sortable: "Drop your items here" empty list placeholder

Created on 8 May 2016  路  2Comments  路  Source: SortableJS/Sortable

Hello, how can i make a placeholder for the drop area when the list is empty?
I tried add a static

  • item with ng-if="list.length == 0" but this list item is also draggable. Maybe disable this item is okay for now but it will be so good that to create empty list placeholder option. Any idea?

  • question

    Most helpful comment

    I think that there is better and simplier way to achive that.
    Add pseudoelement to parent, and check in js for items. If there is any item remove added class with :before or :after content.
    Item will be non dragable and u have full control using events in sortable.

    jsFiddle

    All 2 comments

    I think that there is better and simplier way to achive that.
    Add pseudoelement to parent, and check in js for items. If there is any item remove added class with :before or :after content.
    Item will be non dragable and u have full control using events in sortable.

    jsFiddle

    mark

    Was this page helpful?
    0 / 5 - 0 ratings

    Related issues

    dwburdick picture dwburdick  路  3Comments

    geonanorch picture geonanorch  路  3Comments

    garygreen picture garygreen  路  3Comments

    FINDarkside picture FINDarkside  路  3Comments

    Webifi picture Webifi  路  3Comments