Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi,

    it seems that you have deactivated Sorting at this time. Can you please activate it again?

    The reason for the wrong sorting could be the “N/A” entries. Those will change the column data type to strings, which are sorted differently. If you just leave those cells empty, it should work.

    Also, you should remove the “Custom Command” for currency sorting that you seem to have added to this table.

    Regards,
    Tobias

    Thread Starter cyandle

    (@cyandle)

    Re-enabled. Was fixing another issue with the table.

    Thread Starter cyandle

    (@cyandle)

    The blank spaces just show up at the top.

    Hi,

    thanks for removing that “Custom Command” again.
    However, sorting seems to be deactivated again…

    And what do you expect instead of the empty cells being sorted to the top?

    Regards,
    Tobias

    Thread Starter cyandle

    (@cyandle)

    I enabled it on a lesser important page for you: https://dynastysportsempire.com/dynasty-football-te-rankings/.

    I would expect the blanks to be at the end and 1 to be at the front since we’re using it to “rank” the players.

    Thread Starter cyandle

    (@cyandle)

    If you click on the MD column you will see how it looks with a lot of blanks at the beginning.

    Hi,

    thanks for the example.

    I guess that the blanks being at the top is simply the default for the DataTables JS library (which WP-Table Reloaded uses for the sorting), basically because they are treated as “0”, which comes before “1” obviously.
    Unfortunately, I don’t know if this behavior can be altered easily. Probably, you will need a custom sorting algorithm, for which I would recommend https://www.datatables.net as a starting point.

    Another idea would be to just enter a higher number/rank here, if that is possible without being meaningless?

    Regards,
    Tobias

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘WP-Table Reloaded multiple column sorting issues’ is closed to new replies.