Remove unsort or nosort option on third click?

Remove unsort or nosort option on third click?

jayh99jayh99 Posts: 2Questions: 1Answers: 0

Is it possible to remove the ability to unsort the data? I would like header clicks to only toggle between asc and desc without the ability to not sort the data.

This question has an accepted answers - jump to answer

Answers

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

    Absolutely. Use columns.orderSequence.

    To set the default:

    DataTable.defaults.column.orderSequence = [ 'asc', 'desc' ];
    

    Allan

  • jayh99jayh99 Posts: 2Questions: 1Answers: 0

    Thanks allan!

Sign In or Register to comment.