Skip to content

@koddsson koddsson released this Aug 14, 2019 · 1 commit to master since this release

<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.

Assets 2
  • Merge pull request #9 from github/publish-to-gpr-as-well 37e6894
  • Merge branch 'master' into publish-to-gpr-as-well 2dec9ce
  • publish to GPR as a postpublish step 82a890f

v1.0.3...v1.0.4

Assets 2

@koddsson koddsson released this Aug 6, 2019 · 4 commits to master since this release

  • 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

Assets 2
Jul 1, 2019

@koddsson koddsson released this Jun 27, 2019 · 11 commits to master since this release

  • 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

Assets 2

@muan muan released this Apr 16, 2019 · 18 commits to master since this release

Stable release.

  • In range dependency upgrades
Assets 2

@muan muan released this Apr 5, 2019 · 20 commits to master since this release

  • Event name update
    • task-lists:check -> task-lists-check
    • task-lists:move -> task-lists-move
Assets 2

@mislav mislav released this Feb 22, 2019 · 24 commits to master since this release

  • Drop IE 11 support

  • Stop transforming custom element classes

Assets 2
Sep 11, 2018
0.2.1
Sep 11, 2018
0.2.0
You can’t perform that action at this time.