9.0.4 • Published 3 months ago

@exmg/exmg-sortable v9.0.4

Weekly downloads
82
License
MIT
Repository
github
Last release
3 months ago

<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

NameDescription
defaultElements to sort

Properties/Attributes

NameTypeDefaultDescription
handleSelectorstringNoneSelector of the 'handle' to sort
itemSelectorstringliSelector of the items
animationEnabledbooleanfalseThe value that gets copied and displayed
clonedClassstringNoneClass of the cloned element
draggedClassstringNoneClass of the dragged element
animationTimingobject{duration: 200, easing: 'ease-out'}The timing of the animation
orientationstringNoneWhether or not to display the sortable element horizontally or vertically

Methods

None

Styling

None

Additional references

9.0.4

3 months ago

9.0.3

3 months ago

9.0.1

3 months ago

8.1.35

8 months ago

8.1.34

10 months ago

8.1.31

11 months ago

8.1.33

11 months ago

8.1.32

11 months ago

8.1.19

2 years ago

8.1.18

2 years ago

8.1.17

2 years ago

8.1.10

2 years ago

8.1.13

2 years ago

8.1.12

2 years ago

8.1.14

2 years ago

8.1.9

2 years ago

8.0.1

3 years ago

8.0.0

3 years ago

5.1.3

3 years ago

5.1.2

3 years ago

5.1.1

4 years ago

5.1.0

5 years ago

5.0.2

5 years ago

5.0.1

5 years ago

5.0.0

5 years ago

4.0.3

5 years ago

4.0.2

5 years ago

4.0.1

5 years ago

3.0.1

6 years ago

3.0.0

6 years ago