Sortable list
npm install @ppci/sortable-listjavascript
npm i @ppci/sortable-list// Polyfill: https://lit-element.polymer-project.org/guide/use#polyfills
npm i --save-dev @webcomponents/webcomponentsjs
`$3
#### Javascript
`javascript
import '@ppci/sortable-list'
`#### Browser
`html
.items=${Array}
handleClass=".drag-handle"
>
`$3
Property
Type
Description
Possible Values
items
Array
An array of list items
`javascript
[
Item 1
Handle
,
Item 2
Handle
]
`
handleClass
String
Pass a css classname as drag handle element. If this
value is omitted the entire li will be draggable.
Make sure to prefix classname with a dot.
$3
Name
Description
Payload
@end
Element dragging ended
`javascript
{
/ target list /
to,
/ previous list /
from,
/ element's old index within old parent /
oldIndex,
/ element's new index within new parent /
newIndex,
/ element's old index within old parent, only counting draggable elements /
oldDraggableIndex,
/ element's new index within new parent, only counting draggable elements /
newDraggableIndex,
/ the clone element /
clone,
/ when item is in another sortable: "clone" if cloning, true if moving /
pullMode,
}
``