jQuery DataTables rowReorder issue

前端 未结 4 509
终归单人心
终归单人心 2021-01-03 05:05

I am using DataTables along with the rowReorder plugin against a static table (non AJAX) - everything initialises fine but when I drag a row, whilst it moves within the tabl

4条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-03 05:52

    Try adding an ID or sequence to the table. In the basic initialization example, it says:

    The first column in the table is a sequence number that provides the basis for the ordering.

    In that example it has a hidden sequence column:

    columnDefs: [
        { targets: 0, visible: false }
    ]
    

提交回复
热议问题