JQuery Datatables : Cannot read property 'aDataSort' of undefined

前端 未结 8 1999
日久生厌
日久生厌 2020-12-02 21:43

I created this fiddle to and it works well as per my requirements: Fiddle

However, when I use the same in my application I get an error in the browser console saying

8条回答
  •  没有蜡笔的小新
    2020-12-02 22:19

    In my case I had

    $(`#my_table`).empty();
    

    Where it should have been

    $(`#my_table tbody`).empty();
    

    Note: in my case I had to empty the table since i had data that I wanted gone before inserting new data.

    Just thought of sharing where it "might" help someone in the future!

提交回复
热议问题