I'm trying to add conditional formatting to my list, but when i enter quick edit, my code wont work because it uses the id on the table row to change the color and for some reason the table rows in quick edit only has iid.
This is the code:
(function () {
var overrideCurrentContext = {};
overrideCurrentContext.OnPostRender = postRenderHandler;
SPClientTemplates.TemplateManager.RegisterTemplateOverrides(overrideCurrentContext);
})();
function postRenderHandler(ctx)
{
var rows = ctx.ListData.Row;
for (var i=0;i<rows.length;i++)
{
var row = document.getElementById(GenerateIIDForListItem(ctx, rows[i]));
if(row == null)
continue;
else if(!(rows[i]["TimeLoadingEnd"] === ""))
row.style.backgroundColor = '#8ff268';
else if(!(rows[i]["TimeActualArrival"] === ""))
row.style.backgroundColor = '#eadd9a';
else
row.style.backgroundColor = '#e09f9f';
}
ctx.skipNextAnimation = true;
}
And as you can see, the table row has no id when in quick edit mode: