Sortable: Does it work for tables or not?

Created on 7 Nov 2015  路  2Comments  路  Source: SortableJS/Sortable

I tried to use it for tables not for lists and could not get success. Does it work for tables or not?

Most helpful comment

@tdvsdv it works for tables, you need to trigger it on the <tbody> element though (rather than the <table>)

https://jsfiddle.net/pe7jy5w4/2/

My config:

  $scope.sortConfig = {
    animation: 250,
    draggable: '.sort',
    handle: '.icon-sort',
  };

My html

table > tbody > tr.sort

All 2 comments

https://github.com/RubaXa/Sortable/blob/master/CONTRIBUTING.md

  1. Try dev-branch, perhaps the problem has been solved;
  2. Use the search, maybe already have an answer;
  3. If not found, create example on jsbin.com (draft) and describe the problem.

@tdvsdv it works for tables, you need to trigger it on the <tbody> element though (rather than the <table>)

https://jsfiddle.net/pe7jy5w4/2/

My config:

  $scope.sortConfig = {
    animation: 250,
    draggable: '.sort',
    handle: '.icon-sort',
  };

My html

table > tbody > tr.sort

Was this page helpful?
0 / 5 - 0 ratings