DataTable 更新到 1.11 破坏返回错误
DataTable update to 1.11 destroy returning error
我的应用 运行 在版本 1.10.24 和 1.10.25 上运行良好。
最近我正在尝试更新软件包并移至 1.11.3,但我开始遇到错误。
我的代码相当简单。但是逻辑;是我有一个 Start Process
按钮,当按下该按钮时,某些数据在服务器上处理,响应来自网络套接字,使用 table.add()
添加到 table,第一次工作正常.但用户可以再次按下按钮重新处理服务器上的数据。为此,我正在清除 table.
为
$('#testGrid').DataTable().destroy();
我收到以下错误
dataTables.colResize.js:262 Uncaught TypeError: Cannot read properties of null (reading 'dt')
at ColResize._fnStateSave (dataTables.colResize.js:262)
at jQuery.fn.init.<anonymous> (dataTables.colResize.js:249)
at jquery.dataTables.js:6754
at Function.map (jquery.js:467)
at _fnCallbackFire (jquery.dataTables.js:6753)
at _fnSaveState (jquery.dataTables.js:6405)
at _Api.<anonymous> (jquery.dataTables.js:8815)
at _Api.iterator (jquery.dataTables.js:7145)
at _Api.<anonymous> (jquery.dataTables.js:8804)
at _Api.visible (jquery.dataTables.js:7312)
为
let testGrid = $('#testGrid').DataTable();
testGrid.clear().draw();
没有错误,按下处理按钮后,我尝试添加数据时立即抛出错误
Uncaught TypeError: Cannot set properties of undefined (setting '_aData')
at _Api.<anonymous> (jquery.dataTables.js:8278)
at _Api.data (jquery.dataTables.js:7312)
at results-timeline-grid.js:254
at arrayEach (_arrayEach.js:16)
at Function.forEach (forEach.js:43)
at Class.updateDataSource (results-timeline-grid.js:235)
at Class.onDataUpdated (data-grid.js:31)
at sendEvent (index.js:219)
at Class.trigger (evented.js:113)
at Class.publish (event-bus.js:11)
如前所述,我的代码在 1.10.24、1.10.25 上运行良好
我也在使用其他插件,但没有更新。更新这些插件后解决了
我的应用 运行 在版本 1.10.24 和 1.10.25 上运行良好。
最近我正在尝试更新软件包并移至 1.11.3,但我开始遇到错误。
我的代码相当简单。但是逻辑;是我有一个 Start Process
按钮,当按下该按钮时,某些数据在服务器上处理,响应来自网络套接字,使用 table.add()
添加到 table,第一次工作正常.但用户可以再次按下按钮重新处理服务器上的数据。为此,我正在清除 table.
为
$('#testGrid').DataTable().destroy();
我收到以下错误
dataTables.colResize.js:262 Uncaught TypeError: Cannot read properties of null (reading 'dt')
at ColResize._fnStateSave (dataTables.colResize.js:262)
at jQuery.fn.init.<anonymous> (dataTables.colResize.js:249)
at jquery.dataTables.js:6754
at Function.map (jquery.js:467)
at _fnCallbackFire (jquery.dataTables.js:6753)
at _fnSaveState (jquery.dataTables.js:6405)
at _Api.<anonymous> (jquery.dataTables.js:8815)
at _Api.iterator (jquery.dataTables.js:7145)
at _Api.<anonymous> (jquery.dataTables.js:8804)
at _Api.visible (jquery.dataTables.js:7312)
为
let testGrid = $('#testGrid').DataTable();
testGrid.clear().draw();
没有错误,按下处理按钮后,我尝试添加数据时立即抛出错误
Uncaught TypeError: Cannot set properties of undefined (setting '_aData')
at _Api.<anonymous> (jquery.dataTables.js:8278)
at _Api.data (jquery.dataTables.js:7312)
at results-timeline-grid.js:254
at arrayEach (_arrayEach.js:16)
at Function.forEach (forEach.js:43)
at Class.updateDataSource (results-timeline-grid.js:235)
at Class.onDataUpdated (data-grid.js:31)
at sendEvent (index.js:219)
at Class.trigger (evented.js:113)
at Class.publish (event-bus.js:11)
如前所述,我的代码在 1.10.24、1.10.25 上运行良好
我也在使用其他插件,但没有更新。更新这些插件后解决了