How to SaveState of pagination and search without saving the actual row data

How to SaveState of pagination and search without saving the actual row data

CarlLapCarlLap Posts: 2Questions: 1Answers: 0
edited July 2016 in Free community support

This is the issue I'm having with save state. I want to keep pagination an the search string
1. Click on a table row
2. Get sent to a page where you can edit the row's data
3. Edit the data
4. Hit the back button
5. The data in the row is not updated because of StateSave until you refresh the page

How would I make it so that stateSave does not save the row data? I've looked into https://datatables.net/reference/event/stateSaveParams but i am not sure how to make it work

Answers

  • CarlLapCarlLap Posts: 2Questions: 1Answers: 0
    edited July 2016

    I think I may have figured it out. I tried the following code and it worked:
    .on( 'stateSaveParams.dt', function (e, settings, data) { delete settings.aoData; } );

    If anyone has a better idea I would love to look at it

    EDIT: This fix breaks the search box so this is not a valid fix

This discussion has been closed.