I was wondering if there’s any way to access the set of changes that have occurred when observing a set of records in the store. What I had in mind is to be able to highlight rows or cells in a grid that have received updates, possibly literally as the update is detected.
As far as I can see, the basic . or .@each syntax is not going to help, it simply enables the events to trickle up when any change is detected.
In my scenario, the store changes are arriving via a websocket and store.push(). I do have control over the point where the records are pushed into the store. Perhaps there’s some sort of computed property that could be on the model objects, that would trigger a ‘changed’ flag?
A brute force approach might be:
- about to store.push(newRecord)
- load existingRecord from store
- if found, check for diffs
- if diffs detected, set a changed property on newRecord to true
- new execute store.push(newRecord)
Now in the view, some highlighting can occur where the changed property is set. But that’s going ot be ugly if I’m trying to find cell level changes, not row level.
Any examples like this?