deferRender with vertical scroll fitting

deferRender with vertical scroll fitting

Loren MaxwellLoren Maxwell Posts: 300Questions: 69Answers: 9

Just to confirm . . .

If I understood the explanation from this blog post correctly: https://datatables.net/blog/2017-12-31

then am I correct in believing that deferRender will work if set to true?

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 13,816Questions: 25Answers: 3,252
    Answer ✓

    The deferRender docs state this:

    if you load a data set with 10,000 rows, but a paging display length of only 10 records, rather than create all 10,000 rows, when deferred rendering is enabled, DataTables will create only 10

    In general you will enable scrollY and disable paging. Without paging deferRender will be negated as all the rows are on the single page. I wasn't sure of this so I created this example:
    http://live.datatables.net/jarelilo/1/edit

    You can see with paging false all the rows are rendered. Removing paging: false will render 10 rows but scrolling will be limited to the current page.

    Kevin

  • Loren MaxwellLoren Maxwell Posts: 300Questions: 69Answers: 9

    Thanks, Kevin -- I was hoping this could be a nice lightweight replacement for Scroller, which it is, but being able to take advantage of deferRender would have completed it!

Sign In or Register to comment.