想要通过 Tabulator js 插件禁用列(行号:)排序使用

Wanna disable the column (row no:) from sorting usage by Tabulator js plugin

如何使制表符上的所有列table自动排序,第一列除外

我已经尝试了 sortable:false & headerSort:false

img(1) 初始 table

img(2) 在名称:列处排序 table。

(Target : 剩余No:值从1到6按升序排列连Name:顺序改变。)

你能帮我找到解决办法吗? 谢谢

根据;

https://github.com/olifolkerd/tabulator/issues/861

"You need to set the headerSort property in the column definition object for the column you want to not be sortable, not on the table as a whole. the sortable property you are currently using in your column definition was removed in version 3.0"

$("#mytable").tabulator({
    height:205,                         // Set height of table, this enables the Virtual DOM and improves render speed
    //layout:"fitColumns",              // Fit columns to width of table (optional)
    resizableColumns:false,             // Disable column resize
    responsiveLayout:true,              // Enable responsive layouts
    placeholder:"No Data Available",    // Display message to user on empty table
    initialSort:[                       // Define the sort order:
        {column:"altitude",     dir:"asc"},     // 1'st // THIS IS WHAT YOU'RE LOOKING FOR I ASSUMEN
    ],
    columns:[
        {title:"Flight", field:"flight", headerSort:false, responsive:0, align:"left"}, // , width:250},
        {title:"CallSig", field:"callsign", headerSort:false, responsive:3},
...

进一步阅读:http://tabulator.info/docs/3.3#sorting

编辑:您可以通过编程方式设置排序;

$("#example-table").tabulator("setSort", "age", "asc"); 

希望这对您有所帮助。