FixedColumns not working with StateSave and ServerSideProcessing

FixedColumns not working with StateSave and ServerSideProcessing

barthbarth Posts: 4Questions: 1Answers: 0
edited May 13 in Bug reports

Link to test case: https://live.datatables.net/yiwupeja/1/edit?js,console,output
Debugger code (debug.datatables.net):
Error messages shown: Uncaught TypeError: a[order[i]] is undefined
Description of problem: FixedColumns not working with StateSave and ServerSideProcessing

At first glance, the follwing line in fixedColumns.mjs triggers the problem:

applyStyles(dt.column(idx + ':visible', { page: 'current' }).nodes().to$(), 'body');

To reproduce, go to a page other than the first page and reload the output-window.

This question has an accepted answers - jump to answer

Answers

  • barthbarth Posts: 4Questions: 1Answers: 0

    To reproduce, go to a page other than the first page and reload the output-window.

  • barthbarth Posts: 4Questions: 1Answers: 0

    A fix for the scenario given in the test case (fixedColumns.mjs line 261):

    applyStyles(dt.column(idx + ':visible', { page: 'all' }).nodes().to$(), 'body');
    
  • allanallan Posts: 62,858Questions: 1Answers: 10,344 Site admin
    Answer ✓

    It is an error in DataTables and how it handles the row indexes for server-side processing. It was fixed by this commit and the example works with the latest nightly build (you had included the nightly, but I think it hadn't rebuilt for some reason, or was cached).

    I plan to do a release with the fix soon (possibly today).

    Allan

  • barthbarth Posts: 4Questions: 1Answers: 0

    Thanks Allan, looking forward to the new release. ;)

Sign In or Register to comment.