Reorder with hidden sequence number?
Reorder with hidden sequence number?
Hi,
we use the RowReorder extension but we want to hide the actual sequence number. A simplified version of attempt on the link below.
Link to test case: https://jsfiddle.net/pehol/2eakmygu/
Debugger code (debug.datatables.net):
Error messages shown: -
Description of problem: When the row is dropped it jumps back to its original position rather than staying at the new position. Is it a bug? Can it be accomplished differently?
Thanks,
Per
This question has an accepted answers - jump to answer
Answers
Its not a bug. You don't have the
seqobject assigned to a column withcolumns.data. You changed it to a function. Instead of a function usecolumns.renderand assigncolumns.datatoseq. Like this:https://jsfiddle.net/w6u9g1he/
Kevin
Oh, thank you for the solution
I didn't understand the difference between "data" and "render".
You have this for
columns.data:And you are specifying the
rowGroup.dataSrclike this:Using a function for
columns.datadoesn't set the object key toseqso therowGroup.dataSrcsetting is invalid. I updated your example to compare the Datatables settings for column 0 and 1:https://jsfiddle.net/fqobhz28/
The change I made:
Sets the key to
seqand uses render to display the bullet. Now therowGroup.dataSrcis set for the correct column. I updated my example to compare the same output:https://jsfiddle.net/gdvkyjxu/
HTH,
Kevin