I've been using dgrid's OnDemandGrid with dojo.store.JsonRest rather successfully after a bumpy start, but while implementing caching noticed a glitch: if I do a long swipe of my trackpad (i.e. I scroll rather unscientifically a "long way") and then scroll back, dgrid seems to become confused about where I am at. For example, say I am near row 1609 and then swipe down and find myself looking at row 500. If I then scroll back up towards the top, I'll find the id's of the rows may look something like this 1609, 1608, 1607, 503, 502, 501, 500... If I scroll downward father, it will pick up with the missing rows 499, 498, 497, 1606, 1605, etc.
var store = Observable(Cache(JsonRest({
target: "/cgi-bin/safari/safari_retrv.pl?action=front&format=json",
sortParam: "sort",
idProperty: "queryId"
}),Memory()));
var grid = new declare([OnDemandGrid, Keyboard, Selection, DijitRegistry])({
store: store,
query: {aid: "1604" },
bufferRows: 40,
loadingMessage: "Loading...",
columns: {
aid: "AID",
title: "Title",
poster: "Poster",
postTime: "Posting Date",
commentCount: "Comments"
},
}, "grid");
The problem occurs even if the store is just JsonRest without the Cache store.