AnsweredAssumed Answered

Order table by default desc when click

Question asked by Joao Sousa on Nov 14, 2017
Latest reply on Nov 15, 2017 by Joao Sousa

Hi,

For a "Component Table", name "componentList", I have to set the follow javascript code on the propriety "Draw Function":

Source: https://datatables.net/examples/advanced_init/sort_direction_control.html

 

$(document).ready(function() {
    $('#example').DataTable( {
        "aoColumns": [
            null,
            null,
            { "orderSequence": [ "asc" ] },
            { "orderSequence": [ "desc", "asc", "asc" ] },
            { "orderSequence": [ "desc" ] },
            null
        ]
    } );
} );

My problem is adapt the javascrip to use on Ctools?

Outcomes