Blurry redraws when typing into search fields, when including image in table results
Blurry redraws when typing into search fields, when including image in table results
I have a small image that I'm displaying for each result, in a row, using fnRowCallback.
When the image loads, the search results look a little messy/blurry when typing into the search fields, as the image is being redrawn/reloaded on every keystroke.
Can anyone think of a way to avoid this? I tried "searchDelay" but the redraws still seem to happen instantly, and it doesn't seem to work on individual column filtering.
Ideally I'd delay the loading of the image until the search redraws have been rendered/displayed.. Many thanks in advance for any suggestions.
"fnRowCallback": function( nRow, aData, iDisplayIndex ) {
data = strtrunc2(aData.LastReported, 16);
data = lightgem(data);
$('td:eq(1)', nRow).html(data + '<a href="inv-detail.php?Serial=' + aData.Serial + '">' +
aData.ComputerName + '</a>');
return nRow; },
(lightgem is a JS function I added that works out which image to display (green, red, or orange "light") depending on how old the date field is).
it just echoes: '<img src="myimage.png>'
This isn't a show stopper.. it just looks a bit messier than when the image isn't included.