@exmg/exmg-sortable
TypeScript icon, indicating that this package has built-in type declarations

9.0.4 • Public • Published

<exmg-sortable> Published on npm

@exmg/exmg-sortable

Enables drag and drop sorting of items in a list or table

!!! You should always handle @dom-order-change to update your local .items property to update sorted list properly

Installation

npm install @exmg/exmg-sortable

Example Usage

Standard

<exmg-sortable item-selector="div.box" @dom-order-change="${this.orderChange}">
  <div class="boxes">
    ${this.users.map((user) => { return html`
    <div class="box">${user.firstName}</div>
    `; })}
  </div>
</exmg-sortable>

API

Slots

Name Description
default Elements to sort

Properties/Attributes

Name Type Default Description
handleSelector string None Selector of the 'handle' to sort
itemSelector string li Selector of the items
animationEnabled boolean false The value that gets copied and displayed
clonedClass string None Class of the cloned element
draggedClass string None Class of the dragged element
animationTiming object {duration: 200, easing: 'ease-out'} The timing of the animation
orientation string None Whether or not to display the sortable element horizontally or vertically

Methods

None

Styling

None

Additional references

Package Sidebar

Install

npm i @exmg/exmg-sortable

Weekly Downloads

9

Version

9.0.4

License

MIT

Unpacked Size

24.3 kB

Total Files

9

Last publish

Collaborators

  • xm-nuel
  • oleg_makushev
  • livery-ci
  • exm_erwingoossen
  • martinkolkman
  • em-jeroenv
  • nicholas-exmachina
  • marksmits
  • difosfor
  • tylerexmg
  • padamieo_exmachina
  • albert_exm
  • rdrgcnn
  • sander_exmachina
  • joepadmiraal
  • exmachina-ci
  • remonvv
  • kjelles