Skip to content

Releases: github/task-lists-element

1.0.4

14 Aug 08:17
37e6894
Compare
Choose a tag to compare

<task-lists> element

Drag and drop task list items.

Installation

$ npm install --save @github/task-lists-element

Usage

import '@github/task-lists-element'
<task-lists sortable>
  <ul class="contains-task-list">
    <li class="task-list-item">
      <input type="checkbox" class="task-list-item-checkbox">
      Hubot
    </li>
    <li class="task-list-item">
      <input type="checkbox" class="task-list-item-checkbox">
      Bender
    </li>
  </ul>

  <ul class="contains-task-list">
    <li class="task-list-item">
      <input type="checkbox" class="task-list-item-checkbox">
      BB-8
    </li>
    <li class="task-list-item">
      <input type="checkbox" class="task-list-item-checkbox">
      WALL-E
    </li>
  </ul>
</task-lists>

Events

const list = document.querySelector('task-lists')

list.addEventListener('task-lists-check', function(event) {
  const {position, checked} = event.detail
  console.log(position, checked)
})

list.addEventListener('task-lists-move', function(event) {
  const {src, dst} = event.detail
  console.log(src, dst)
})

Browser support

Browsers without native custom element support require a polyfill.

  • Chrome
  • Firefox
  • Safari
  • Microsoft Edge

Development

npm install
npm test

License

Distributed under the MIT license. See LICENSE for details.

v1.0.3

06 Aug 13:05
9dbbe62
Compare
Choose a tag to compare
  • Merge pull request #10 from github/dependabot/npm_and_yarn/lodash-4.17.15 5463dca
  • Bump lodash from 4.17.11 to 4.17.15 1f7132a

v1.0.2...v1.0.3

v1.0.1

27 Jun 10:56
4270f8f
Compare
Choose a tag to compare
  • Merge pull request #7 from github/update-deps 483dac9
  • fix shadowed variable 883f124
  • annotate event handler event variable with Event type d4d69dd
  • update dependencies a09029d
  • run npm update 2db3623
  • Merge pull request #6 from github/onedoto e47bb59

v1.0.0...v1.0.1

v1.0.0

16 Apr 21:31
9b8f4a8
Compare
Choose a tag to compare

Stable release.

  • In range dependency upgrades

v0.4.0

05 Apr 21:29
6b7e9d8
Compare
Choose a tag to compare
  • Event name update
    • task-lists:check -> task-lists-check
    • task-lists:move -> task-lists-move

0.3.0

22 Feb 10:51
Compare
Choose a tag to compare
  • Drop IE 11 support

  • Stop transforming custom element classes