Not all results the columns is sorting working

Not all results the columns is sorting working

matchdaylistmatchdaylist Posts: 3Questions: 1Answers: 0
edited November 2019 in Free community support

I have just implemented datatables very easy and nice tool :smiley:

But I found a little bug I thought it's working correctly but I found out that for some result the sorting is not working.

Example where the sorting is working:
https://matchdaylist.com/index.php?ArrDate=2019-11-23&ToDate=2019-11-23&city=Birmingham%2C+Verenigd+Koninkrijk&range=30&submit=

And for this result it's not working:
https://matchdaylist.com/index.php?ArrDate=2019-11-23&ToDate=2019-11-23&city=London%2C+Verenigd+Koninkrijk&range=30&submit=
also:
https://matchdaylist.com/index.php?ArrDate=2019-11-23&ToDate=2019-11-23&city=Manchester%2C+Verenigd+Koninkrijk&range=30&submit=

As you can see the only difference is London and Machchester.

Does anybody know how this is possible?

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,598
    Answer ✓

    Hi @matchdaylist ,

    It's because of the colspan in the last row, DataTables doesn't support it - see here - and that causes an error during initialisation (you can see it in the console).

    The fix would be to move that line down into the table footer; colspan is supported there.

    Cheers,

    Colin

  • matchdaylistmatchdaylist Posts: 3Questions: 1Answers: 0

    Hi @colin,

    I'm not using a colspan in my code so I don't know what to remove.
    When I inspect then I see a colspan on a table with result where sorting is working.

    The weird thing is that one search result is working the other not?

    Thanks,
    Martijn

  • matchdaylistmatchdaylist Posts: 3Questions: 1Answers: 0

    Hi @colin,

    Found it my mistake.

    Thanks for your help!

    Cheers,
    Martijn

This discussion has been closed.