mRender when providing a list of items called on init for every item

mRender when providing a list of items called on init for every item

srozgasrozga Posts: 4Questions: 2Answers: 0
edited September 2014 in Free community support

I have a list of a 10,000+ items that I'd like to display in a datatables instance. I am using a custom mRender implementation and I would like to paginate 50 items at a time. But when I set the data on the datatables constructor options, it seems mRender is called for all of my items instead of 50 at a time. Is there any way to configure datatables to only render one page at a time?

Answers

  • allanallan Posts: 63,552Questions: 1Answers: 10,477 Site admin

    If you are Ajax loading the data you can use deferRender to reduce the number of times that mRender is called. However, recall that mRender is access for all data types, so it might be called to get sorting data or filtering data for the cell(s) in question, depending on the configuration of your table.

    Allan

This discussion has been closed.