【问题标题】:DataTables warning: table id=DataTables_Table_1 - Cannot reinitialise DataTable In Angular 13DataTables 警告:table id=DataTables_Table_1 - 无法在 Angular 13 中重新初始化 DataTable
【发布时间】:2022-01-25 08:43:18
【问题描述】:

我已经在 Angular 13 中实现了 jQuery Datatable Grid。但是当我删除记录并刷新数据表时。然后发生以下错误。

DataTables warning: table id=DataTables_Table_1 - Cannot reinitialise DataTable. For more information about this error, please see http://datatables.net/tn/3

有什么解决办法吗??

【问题讨论】:

    标签: datatables angular-datatables angular13


    【解决方案1】:

    经过几个小时的努力,我找到了解决办法。

    只需在 this.dtOptions = {} 中添加 destroy:true,如下所示

     this.dtOptions = {
          pagingType: 'full_numbers',
          pageLength: 10,
          scrollX: true,
          processing: true,
          deferRender: true,
          destroy:true
        };
    

    错误将被修复。谢谢

    【讨论】:

    • 接受您的回答以解决问题。 :)
    猜你喜欢
    • 2018-04-24
    • 1970-01-01
    • 2016-03-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-08-29
    • 2015-11-04
    • 2015-05-30
    相关资源
    最近更新 更多