Cannot delete data.scroller in stateSaveParams

Cannot delete data.scroller in stateSaveParams

tom99tom99 Posts: 48Questions: 10Answers: 0
edited November 2020 in Free community support

http://live.datatables.net/cifubuya/1/edit

I was able to delete scroller position etc. in 1.10.16 by doing this:

      stateSave: true,
      stateSaveParams: function (settings, data) {
        delete data.iScroller;
        delete data.iScrollerTopRow;
      }

After upgrade to 1.10.22, the properties have changed and scroller properties are now stored in "data.scroller".
But I cannot delete this property during save.
See the above example. Scroll to somewhere and hit F5. The scroll positions are not reset.
Also see the browser console. It looks like something adds the scroller property AFTER stateSaveParams.

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,599

    Odd - not sure why that's happening. A workaround would be to remove the scroller properties on page load instead - something like this,

    Colin

  • tom99tom99 Posts: 48Questions: 10Answers: 0

    Yes, I am doing that now. Still I think this is a bug that should be fixed.

  • colincolin Posts: 15,237Questions: 1Answers: 2,599

    Agreed. I raised it internally (DD-1748 for my reference) and we'll report back here when there's an update.

    Cheers,

    Colin

This discussion has been closed.