DataTables 2: ColReorder not working

DataTables 2: ColReorder not working

craiutzcraiutz Posts: 3Questions: 0Answers: 0

Reset ordering API not working:

You can test it here:

https://datatables.net/extensions/colreorder/examples/initialisation/reset.html

Click on a column to order then try to reset ordering.

Thanks

Replies

  • allanallan Posts: 61,743Questions: 1Answers: 10,111 Site admin

    The button actually seems to do what I would expect. Click to drag a column, so you reorder the column arrangement. Then click the button and the headers / columns will go back into the same position as when the table was loaded. Is that not happening for you?

    Your question makes it sounds like you are expecting the button to reset the row order?

    Allan

  • craiutzcraiutz Posts: 3Questions: 0Answers: 0

    Thanks Allan,

    It seems it's working as expected.

    Indeed I was expecting a reset of the order for the values in that column.
    Is there a way to reset order? I know I can click twice on the column.

    Thank you

  • allanallan Posts: 61,743Questions: 1Answers: 10,111 Site admin

    Sure: order() will set the order of the table. Just set it to be an empty array.

    Allan

  • craiutzcraiutz Posts: 3Questions: 0Answers: 0

    Thank you

Sign In or Register to comment.