How to use the html5sortable/dist/html5sortable.es function in html5sortable

To help you get started, we’ve selected a few html5sortable examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github decidim / decidim / decidim-admin / app / packs / src / decidim / admin / sort_list.component.js View on Github external
constructor(sortListSelector, options) {
    if ($(sortListSelector).length > 0) {
      sortable(sortListSelector, options)[0].addEventListener("sortupdate", (event) => {
        const $children = $(event.target).children();

        if (options.onSortUpdate) {
          options.onSortUpdate($children);
        }
      });
    }
  }
}

html5sortable

VanillaJS sortable lists and grids using native HTML5 drag and drop API.

MIT
Latest version published 5 months ago

Package Health Score

73 / 100
Full package analysis