- Notifications
You must be signed in to change notification settings - Fork23
Drag and drop task list items.
License
NotificationsYou must be signed in to change notification settings
github/task-lists-element
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Drag and drop task list items.
$ npm install --save @github/task-lists-element
Import as a module:
import'@github/task-lists-element'
With a script tag:
<scripttype="module"src="./node_modules/@github/task-lists-element/dist/task-lists-element.js">
<task-listssortable><ulclass="contains-task-list"><liclass="task-list-item"><inputtype="checkbox"class="task-list-item-checkbox"> Hubot</li><liclass="task-list-item"><inputtype="checkbox"class="task-list-item-checkbox"> Bender</li></ul><ulclass="contains-task-list"><liclass="task-list-item"><inputtype="checkbox"class="task-list-item-checkbox"> BB-8</li><liclass="task-list-item"><inputtype="checkbox"class="task-list-item-checkbox"> WALL-E</li></ul></task-lists>
constlist=document.querySelector('task-lists')list.addEventListener('task-lists-check',function(event){const{position, checked}=event.detailconsole.log(position,checked)})list.addEventListener('task-lists-move',function(event){const{src, dst}=event.detailconsole.log(src,dst)})
Browsers without nativecustom element support require apolyfill.
- Chrome
- Firefox
- Safari
- Microsoft Edge
npm installnpm test
Distributed under the MIT license. See LICENSE for details.
About
Drag and drop task list items.
Topics
Resources
License
Code of conduct
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.