Socket
Socket
Sign inDemoInstall

@exmg/exmg-sortable

Package Overview
Dependencies
11
Maintainers
18
Versions
30
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @exmg/exmg-sortable

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


Version published
Weekly downloads
5
decreased by-44.44%
Maintainers
18
Created
Weekly downloads
 

Readme

Source

<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

Keywords

FAQs

Last updated on 14 Feb 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc