Skip to content

Instantly share code, notes, and snippets.

@lvegerano
Created March 11, 2020 14:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lvegerano/b3118b59c5bb32fe928f957444ef6203 to your computer and use it in GitHub Desktop.
Save lvegerano/b3118b59c5bb32fe928f957444ef6203 to your computer and use it in GitHub Desktop.
<SortableJs
class="list-group"
@items={{array "one" "two" "three" "four" "five"}}
@options={{hash animation=150 ghostClass="ghost-class" group="shared"}}
@onRemove={{this.onRemove}}
@onEnd={{this.onEnd}}
as |list|
>
{{log 'running a' list}}
{{#each list as |item index| }}
<div data-list-item={{index}} class="list-group-item">{{item}}</div>
{{/each}}
</SortableJs>
<br>
<SortableJs
class="list-group"
@items={{array "one" "two" "three" "four" "five"}}
@options={{hash animation=150 ghostClass="ghost-class" group="shared"}}
@onAdd={{fn this.onAdd}}
as |list|
>
{{log 'running b' list}}
{{#each list as |item index| }}
<div data-list-item={{index}} class="list-group-item bg-yellow">{{item}}</div>
{{/each}}
</SortableJs>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment