telerik / kendo-angular

Issue tracker - Kendo UI for Angular
http://www.telerik.com/kendo-angular-ui/
Other
467 stars 217 forks source link

toDataSourceRequest() doesn't serialize the group aggregates #2957

Open svetq opened 4 years ago

svetq commented 4 years ago

Describe the bug Currently the toDataSourceRequest() method doesn't serialize the group aggregates.

To Reproduce Please check the following example: https://stackblitz.com/edit/angular-kistco-marhdj?file=app%2Fnorthwind.service.ts

` public fetch(state: any): Observable { let aggregates: any[] = [{ field: 'contactTitle', aggregate: 'count' }, { field: 'contactName', aggregate: 'count' }];

              if (state && state.group) {
                state.group.map(group => group.aggregates = aggregates);
              }

               const queryStr = `${toDataSourceRequestString(state)}`;
               console.log(state, queryStr)`

Additional Information

Root level aggregates can be added to the state and serialized with the toDataSourceRequest() as follows:

https://stackblitz.com/edit/angular-pngodw

dennitorf commented 2 years ago

There is any update or workaround for this bug? Thanks.

kharmon00 commented 1 year ago

I also see this problem. Any progress on a resolution?