Reuse table.state.save() for new data set

Reuse table.state.save() for new data set

ScyzorScyzor Posts: 19Questions: 5Answers: 0

Is there any way to reuse filters when table.state.save(); is set for new data set for the table? I'm looking for something like to auto apply those filters.

Answers

  • colincolin Posts: 15,142Questions: 1Answers: 2,586

    Hi @Scyzor ,

    I'm not clear what the question is, but this might help - it's showing how additional data can be added to the saved state, and re-added on table load (it's reselecting the rows) - http://live.datatables.net/secukipe/1/edit

    Cheers,

    Colin

  • ScyzorScyzor Posts: 19Questions: 5Answers: 0

    No, I'm looking for something like I will a data into the table, filter than based on provided string and then I want to load new data set to the table and re-use the same filter (provided string) without typing it once again.

  • colincolin Posts: 15,142Questions: 1Answers: 2,586

    stateSave will store the main filter for the table which will be restored, and any filters applied to each column will also be saved. It might be worth producing a test case as I suspect it would help move this along.

This discussion has been closed.