Appropriate way to update filtering cache?

Appropriate way to update filtering cache?

calciphuscalciphus Posts: 1Questions: 0Answers: 0
edited June 2013 in General
Hi there,

I'm using a client-side manipulated table with a bunch of data loaded into it. However, I have given the user the option of editing some of the values in the table, and I want to know if there's a "proper" way to refresh the filter cache in the table, short of destroying and recreating it.

If a user updates a cell, filtering still reflects the old value of the cell. From what reading and searching I've done, this is because the cache is created at the time of table creation, and is only updated with certain calls (such as fnUpdate) are made. I'd love a call I could make entirely outside of the initialization of the table, such as

$('#example').dataTable().fnUpdateCache()

Does anything like this exist?

Replies

  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin
    Why not just use fnUpdate?

    Having said that, DataTables 1.10 is going to have a new `row( selector ).invalidate()` function which I think is exactly what you want. You can see it being used in a 1.10 _pre-beta_ demo here: http://datatables.net/dev/knockout/

    Allan
This discussion has been closed.