Hello,
Goal
My table auto saves every 60 seconds. Within those 60 seconds, a user can make multiple changes. These changes remain unsaved until the auto save timer reaches 0 seconds, or the user manually presses save. Therefore, I would like to visually distinguish which cells are currently unsaved by coloring them yellow.
My Current Approach
On each save, I iterate through every cell, modifying the cell properties like so:
cellProperties.savedValue = currentValue;
Then, in my render function, I do:
function myRenderer(instance, td, row, col, prop, value, cellProperties)
{
var savedValue = cellProperties.savedValue;
if (savedValue != value)
{
td.style.backgroundColor = "yellow";
}
}
The Problem
This seems to work perfectly fine until filtering comes into play. The problem is as follows:
- While there are no filters active, change some values. The changed cells become yellow.
- Then, Filter out the rows with these changed cells.
- Then, Press Save. As far as I know, setCellMeta cannot access the filtered cells in order to update cellProperties.
- When I remove all filters, these cells are still colored yellow, because their properties were not set
Any help would be much appreciated!