Open svetq opened 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
There is any update or workaround for this bug? Thanks.
I also see this problem. Any progress on a resolution?
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' }];
Additional Information
Root level aggregates can be added to the state and serialized with the toDataSourceRequest() as follows:
https://stackblitz.com/edit/angular-pngodw