-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SingleQuery and grid.get('total') #1271
Comments
Thanks for pointing out the omission of setting As for why it's not in dgrid as a first-class mixin, the main reason was to avoid the footgun of people finding it in plain sight, then using it for inappropriately large data sets (or with stores that ordinarily would be used to request a small range at a time from a server), and then wrongly assuming that dgrid is to blame for the ensuing performance nightmare. However, at this point it sort of is in the repository anyway (tucked under the folder for the laboratory demo which makes use of it), which kind of seems silly. I'm planning to have another discussion with the team as to whether it's time to just promote it after all (maybe with a warning if it detects a large data set), at least for 1.x. |
We've decided to go ahead and add |
Cool. Thanks Ken. |
Adding this (along with support for things like |
This is more of an issue on a like to have/request.
First, thanks for the SingleQuery tutorial at the dgrid.io site. It's a useful mixin for the in-memory store I was working with. Would it be possible to add this mixin to dgrid itself? It's usefulness suggests that it is worthy of inclusion.
And the issue I had was that I needed to display the total number of rows after setting a filtered collection to the grid. I came across the issue that pointed me to using grid.get('total'). After discovering that get('total') always returned zero with the SingleQuery mixin, I looked at the code in _StoreMixin and realized that the _total property would never be set.
I'd like to suggest updating the SingleQuery tutorial to include setting total in the renderArray function, so that grid.get('total') functions properly.
The text was updated successfully, but these errors were encountered: