datatables.api().ajax.reload();不刷新bug

datatables.api().ajax.reload();接口调用了也返回了数据,但是表格就是不刷新

你想刷新表格,你要用js代码给表格赋值啊
你的数据都在后台,表格为什么要刷新

  • 这篇博客: datatables 重新加载表格 页数不变中的 unction ajax.reload( callback, resetPaging ) 部分也许能够解决你的问题, 你可以仔细阅读以下内容或跳转源博客中阅读:
  • Parameters:

     NameTypeOptional
    1callback

    function

    Yes - default:null
     

    Function which is executed when the data has been reloaded and the table fully redrawn. The function is given a single parameter - the JSON data returned by the server, and expects no return.

    2resetPaging

    boolean

    Yes - default:true
     

    Reset (default action or true) or hold the current paging position (false). A full re-sort and re-filter is performed when this method is called, which is why the pagination reset is the default action.

    Returns:

    DataTables.Api

    DataTables.Api instance