Images are requested for all rows even with pagination on
Images are requested for all rows even with pagination on
happyboy007
Posts: 1Questions: 1Answers: 0
Hello,
I have a table with the data of users + their avatars however on page load I have more than 1500 requests (the avatar of each user) even though pagination is is enabled.
My config:
ajax: $("#user-table").data("url"),
paging: true,
iDisplayLength: 6,
bLengthChange: false,
The column def for the the avatar + name combo
{
aTargets: [ 0 ],
mRender: function ( data, type, full ) {
return '<img class="table-profile-image" src="' + full.avatar + '"/> ' +
'<a href="' + full.url + '">' + data + '</a>';
}
},
Is there a solution for this? (the best way would be to only load the images when they are displayed)
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Add
deferRender: true
to your initialisation options.deferRender
is the documentation for that parameter. It should solve that issue.Allan