Search Panes - set default ordering of panes

Search Panes - set default ordering of panes

BartoszJarmuzBartoszJarmuz Posts: 9Questions: 3Answers: 0

Hello,
Is it possible to set a default ordering for searchPanes? it seems it's done based on the label text. I'd like to order it by the match count.
http://live.datatables.net/toraqudo/6/edit?html,js,output

Kind regards,
Bartek

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,146Questions: 1Answers: 2,587

    Yep, you're right - the default if the label text. The user can change the ordering to the match count by clicking on the '#' icon, but that's not available programmatically.

    It's a good suggestion, so I've raised it internally (DD-1353 for my reference) and we'll report back here when there's an update.

    Cheers,

    Colin

  • sandysandy Posts: 913Questions: 0Answers: 236
    Answer ✓

    Hi @BartoszJarmuz ,

    This is actually available by making use of the searchPanes.dtOpts property.

    It allows you to setup your panes using any options that are available to a DataTable -Including order. I've altered your test case to show how this can be done.

    Hope that helps,
    Sandy

  • BartoszJarmuzBartoszJarmuz Posts: 9Questions: 3Answers: 0

    You guys are awesome...
    Thanks!

This discussion has been closed.