fnOrder() does not return new columns order after a drag'n'drop reordering
fnOrder() does not return new columns order after a drag'n'drop reordering
Pierric
Posts: 2Questions: 0Answers: 0
Hi,
I've found a problem with the ColReorder extra : the fnOrder() method doesn't returns the correct order of the columns : it always returns the original order.
According to the documentation (http://datatables.net/extras/colreorder/api) :
[quote]" fnOrder [...] get the current order of the columns, as an array. Note that the values given in the array are unique identifiers for each column. Currently these are the original ordering of the columns that was detected on start up, but this could potentially change in future. "[/quote]
You can test it here : http://jsfiddle.net/Pierric/L7WpJ/25/
Here's the console log after 3 reorderings using drag'n'drop:
[code]
Original order = [0, 1, 2, 3, 4, 5, 6, 7]
Order after reordering : 0,1,2,3,4,5,6,7
Order after reordering : 0,1,2,3,4,5,6,7
Order after reordering : 0,1,2,3,4,5,6,7
[/code]
Is it a bug or am I missing something?
Many thanks. :-)
I've found a problem with the ColReorder extra : the fnOrder() method doesn't returns the correct order of the columns : it always returns the original order.
According to the documentation (http://datatables.net/extras/colreorder/api) :
[quote]" fnOrder [...] get the current order of the columns, as an array. Note that the values given in the array are unique identifiers for each column. Currently these are the original ordering of the columns that was detected on start up, but this could potentially change in future. "[/quote]
You can test it here : http://jsfiddle.net/Pierric/L7WpJ/25/
Here's the console log after 3 reorderings using drag'n'drop:
[code]
Original order = [0, 1, 2, 3, 4, 5, 6, 7]
Order after reordering : 0,1,2,3,4,5,6,7
Order after reordering : 0,1,2,3,4,5,6,7
Order after reordering : 0,1,2,3,4,5,6,7
[/code]
Is it a bug or am I missing something?
Many thanks. :-)
This discussion has been closed.
Replies
For example: http://jsfiddle.net/L7WpJ/26/
Allan
Pierric