On Row Order, is it possible to get the "initiating row ID"?

On Row Order, is it possible to get the "initiating row ID"?

acaviteacavite Posts: 3Questions: 1Answers: 0

The title says it pretty well, but for a little clarification..

When you click on a row to drag and drop it into a different position on the table, is it possible to identify the initial row (the one being dragged) specifically as the instigator of change?

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 64,631Questions: 1Answers: 10,686 Site admin
    Answer ✓

    Yes - you can use the row-reorder event's arguments to do that:

    table.on( 'row-reorder', function ( e, details ) {
      var node = details.node;
      var row = table.row( node );
      // etc
    } );
    

    Allan

This discussion has been closed.