@shotleybuilder/svelte-gridlite-kit 0.4.1 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/GridLite.svelte +6 -2
- package/package.json +1 -1
package/dist/GridLite.svelte
CHANGED
|
@@ -219,6 +219,8 @@ async function rebuildGroupedQuery() {
|
|
|
219
219
|
try {
|
|
220
220
|
const usePagination = features.pagination !== false;
|
|
221
221
|
const topGroupConfig = cleanAgg(validGrouping[0]);
|
|
222
|
+
const groupedColumnNames = validGrouping.map((g) => g.column);
|
|
223
|
+
const groupSorting = sorting.filter((s) => groupedColumnNames.includes(s.column));
|
|
222
224
|
const summaryQuery = buildGroupSummaryQuery({
|
|
223
225
|
...querySource,
|
|
224
226
|
grouping: [topGroupConfig],
|
|
@@ -226,7 +228,7 @@ async function rebuildGroupedQuery() {
|
|
|
226
228
|
filterLogic,
|
|
227
229
|
allowedColumns,
|
|
228
230
|
globalSearch: globalFilter || void 0,
|
|
229
|
-
sorting,
|
|
231
|
+
sorting: groupSorting,
|
|
230
232
|
page: usePagination ? page : void 0,
|
|
231
233
|
pageSize: usePagination ? pageSize : void 0
|
|
232
234
|
});
|
|
@@ -294,6 +296,8 @@ async function fetchGroupChildren(group) {
|
|
|
294
296
|
}));
|
|
295
297
|
if (nextDepth < validGrouping.length) {
|
|
296
298
|
const subGroupConfig = cleanAgg(validGrouping[nextDepth]);
|
|
299
|
+
const groupedColumnNames = validGrouping.map((g) => g.column);
|
|
300
|
+
const groupSorting = sorting.filter((s) => groupedColumnNames.includes(s.column));
|
|
297
301
|
const summaryQuery = buildGroupSummaryQuery({
|
|
298
302
|
...querySource,
|
|
299
303
|
grouping: [subGroupConfig],
|
|
@@ -310,7 +314,7 @@ async function fetchGroupChildren(group) {
|
|
|
310
314
|
filterLogic,
|
|
311
315
|
allowedColumns,
|
|
312
316
|
globalSearch: globalFilter || void 0,
|
|
313
|
-
sorting
|
|
317
|
+
sorting: groupSorting
|
|
314
318
|
});
|
|
315
319
|
const result = await db.query(
|
|
316
320
|
summaryQuery.sql,
|