- Notifications
You must be signed in to change notification settings - Fork0
Ember CLI addon for RubaXa's sortable plugin
License
DirtJockey/ember-cli-sortable
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This is an ember-cli addon that integratesRubaXa's Sortable plugin with Ember.It is still rough around the edges but works pretty well and is currently being used in production.
ember install:npm ember-cli-sortableember generate ember-cli-sortable
{{sortable-itemsitemCollection=someArrayanimation=100handle=".item__handle"filter=".item--pinned"draggable=".item"ghostClass="item--ghost"onItemMoveAction="itemMoved"templateName="sortable-items-partial"noItemText="<div style='text-align:center'>No items found</div>"}}
You'll then need a partial namedsortable-items-partial
that will have access toitem
This template will be looped over all the items in the array.
sortable-items-partial.hbs
<div> <div>{{item.name}}</div> <div>{{item.content}}</div></div>
You'll also need anitemMoved
action handler in your controller / parent component as per the example above.
####Supports all properties and callbacks fromRubaXa's Sortable
####Properties
sortdisabledstoreanimationhandlefilterdraggableghostClassscrollscrollSensitivityscrollSpeed
####Callbacks
onStartonAddonEndonUpdateonSortonRemoveonFilter
AddAction
at the end of each callback to specify your own action handlers
Example
{{sortable-itemsonStartAction="myStartAction"onAddAction="myAddAction" ... ... ...}}
Fork this repository, make a feature branch and send in a pull request.
About
Ember CLI addon for RubaXa's sortable plugin
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Languages
- JavaScript86.8%
- HTML13.2%