Skip to content
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

Problems with summary and total Items #8

Open
mantfacil opened this issue Dec 16, 2021 · 0 comments
Open

Problems with summary and total Items #8

mantfacil opened this issue Dec 16, 2021 · 0 comments

Comments

@mantfacil
Copy link

First of all, thank you very much for your contribution.

I have a problem with the summary and the totalItems. These are the steps that I perform in a data grid.

  1. I start the grid with a summaryType, of type count, on a column. Ex: total: 55
  2. Group on another column. The total remains at 55
  3. Filter on a value of the grouped column. The total should be changed to 1, but remains at 55.

I have this codepen: (https://codepen.io/Diego_MF/pen/MWEpbbG) where I communicate with one devexpress api and all this that I tell you works well.

When I look at how the data comes in, I see differences in it.
This is how it comes on devexpress:
{"data": [{"key": "Arizona", "items": null, "count": 1, "summary": [1]}], "summary": [1]}
{"data": [{"OrderNumber": 39420, "SaleAmount": 20500, "StoreCity": "Tuscon", "StoreState": "Arizona", "Employee": "Jim Packard", "OrderDate": "2013 / 12/28 "}]," summary ": [1]}

This is how it comes from the DRF api:

{"data": [{"key": "City", "count": 1, "summary": [1], "items": null}]}
{"totalCount": 1, "summary": [1], "data": [{"city_key": "10001", "city_code": "bue", "city_name": "Buenos Aires"}]}

Also, within my script I have declared remoteOperations: true and the summary is declared like this:
summary: { totalItems: [{ column: "city_key", summaryType: 'count' }] }

I use Django version 3.2.4 and djangorestframework version 3.12.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant