jQuery DataTables sorting is not working

后端 未结 1 1116
礼貌的吻别
礼貌的吻别 2021-01-28 01:18

Using jQuery 2.1.3 and DataTables 1.10.5, my table won\'t sort when I click on the up- and down-arrows above the columns. From what I can tell from the documentation, this is th

相关标签:
1条回答
  • 2021-01-28 01:41

    You have to define the type of your column data. The problem here is coming from the hyphen it seems, it is working without it

    Solution : JsFiddle

    $('#table-guid').dataTable( {
        "columnDefs": [
            { "type": "numeric-comma", targets: "_all" }
        ]
    });
    

    Here is the documentation

    0 讨论(0)
提交回复
热议问题