Support » Plugin: wpDataTables - Tables & Table Charts » No way to add table without sorting?

  • Resolved darkNiGHTS

    (@darknights)


    I am trying to add a simple two column Excel file of data to a table, but it keeps insisting on sorting by one column or the other. What about neither? I want the months to be in order, but clearly sorting that alphabetically is not the solution.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author wpDataTables

    (@wpdatatables)

    Hi there.

    When you create a table, navigate to “Sorting and filtering” tab above the table, and there you will see a slider “Sorting”. If you disable that slider, the table will load as it is in Excel, and it will not be sorted by any column.

    Best regards.

    Can you add a toggle to not sort on load? I’d like to keep the table sortable – at the user’s discretion, but load in the order I choose.. This code below is what works with Datatables.

    $(document).ready( function() {
    $(‘#example’).dataTable({
    /* No ordering applied by DataTables during initialisation */
    “order”: []
    });
    })

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.