SitePen / dgrid

A lightweight, mobile-ready, data-driven, modular grid widget designed for use with dstore
http://dgrid.io/
Other
628 stars 298 forks source link

OnDemandList.js - line 326 in renderQueryResults function error, plus no scrolling for next range of items #1429

Closed jengait closed 4 years ago

jengait commented 5 years ago

I am using OnDemandGrid (1.2.1) with a dstore (1.1.2), and an error is being thrown in OnDemandList.js; both rows and resolvedRows are undefined.

My dstore is defined first like this: var TrackedRestStore = declare([Rest, SimpleQuery, Trackable]); seStore = new TrackedRestStore({ target: appUrl + "api/SP_SURVEY", accepts: "application/json", idProperty: "SURVEY_ID", sortParam: "sort", rangeStartParam: 'start', rangeCountParam: 'count' });

And dgrid is defined afterwards like this: `seGrid = new (declare([OnDemandGrid, Selection, DijitRegistry, Keyboard, Editor, ColumnHider, ColumnResizer, ColumnReorder]))({ id: "seGrid", idProperty: "ID", cellNavigation: true, columns: seColumns, collection: seStore.filter({ AREA: sArea }).sort({ property: "ID", descending: true }), region: 'center', selectionMode: "multiple" getBeforePut: false, farOffRemoval: 500,
keepScrollPosition: true, noDataMessage: "No results found.", showFooter: true });

            gridLC.addChild(seGrid);
            seGrid.startup();`

I can't figure out why it thinks that rows is undefined; in stepping through the code I can see that it is requesting the first 25 items and that the total returned is 225. I have tried this both with the rangeStartParam and rangeCountParam options defined, and also have tried returning the Content-Range header in the response. I wrote the backend web service as well, and the first 25 items populate the grid, but when I scroll down to the bottom there is not a new request sent to the server.

What am I missing here?

jengait commented 5 years ago

Seems like if I use 'debounce' only the first 25 records get requested and displayed, and I can't scroll down any further. But if I set it to 'throttleDelayed' then I seem to have the ability to scroll down past the first set, but there are big white spaces between the sets of rows...??

msssk commented 4 years ago

Is this issue still occurring? If so, can you provide a test case and specify the browser(s) the bug occurs in?

msssk commented 4 years ago

Closing this issue as it lacks sufficient information to reproduce and has been inactive for a long time. If you continue to experience problems please open a new issue and provide a test case.