New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@fw-components/fw-dnd

Package Overview
Dependencies
Maintainers
0
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fw-components/fw-dnd

Drag-n-drop list

  • 2.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

Drag and drop list

The fw-dnd component is used to reorder the list of items using drag and drop.

Installation

npm i @fundwave/fw-dnd

Example usage

const dragList = [{ name:"Aayush", company:"Fundwave" }, { name:"Isha Sharma", company:"Fundwave" }]
<fw-dnd
  .list=${dragList}
  @list-updated=${updateList}
  .dragItemRenderer=${ (item) => html `<p>${item.name}</p>` }
></fw-dnd>

API

Properties/Attributes

NameTypeDefaultDescription
listArray[]Array which have all list items
dragItemRendererFunctionHTML content render for every item of list

Methods

dragStart()

Stores drag target element to categories property and set dataTransfer of event

drop()

Handle the reordering of the list Using startContainer and endContainer

Events

@list-updated

Return the reordered list to the parent

FAQs

Package last updated on 20 Nov 2024

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc