Strange behaviour with default sort direction and stateSave

Strange behaviour with default sort direction and stateSave

chtcht Posts: 14Questions: 0Answers: 0
edited June 2014 in DataTables 1.10

Hi,

I'm using Datatables 1.10.0 and Scroller 1.2.2dev with stateSave, serverSide and ajax. I see a strange behaviour for the default sort direction and stateSave. Whenever the the sort-direction is ascending and you re-enter the page you need to click two times on the header in order to sort descending.

My testsystem is: http://tinyurl.com/l2ne36t Your login is: allan / 1234

Debug information: http://debug.datatables.net/epecoz

To see the issue do the following:

  • After login you will be taken to a page called "Mandators - selection".
  • The table is sorted ascending over the first column by default.
  • Click on the 'Filter' Tab and then on 'List' Tab
  • Click on the header of the first Column to sort descending -> Data is loaded but not descending
  • Click again on the header of the first Column to sort descending -> Data is loaded descending

I hope, you can follow my description. If you need more information to analyze this, please let me know.

Cheers, Christian

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    Hi Christian,

    Thanks for your clear explanation and access to the page so I can see what is happening. What you are seeing is a bug in DataTables 1.10.0 I'm sorry to say. Could you update to the very latest nightly which contains a fix for this (I've been working improving the state saving in the last few days and this bug has been fixed as a result). The nightly is available at:

    Let me know how you get on with it!

    Regards,
    Allan

  • chtcht Posts: 14Questions: 0Answers: 0

    Hi Allan,
    your changes in the nightly build fix the issue.
    Thanks again for your support.

    Regards,
    Christian

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    Excellent to hear. Thanks for the feedback!

    I'm going to be packaging DataTables and the extensions up for a new release soon.

    Allan

This discussion has been closed.