@shotleybuilder/svelte-gridlite-kit 0.4.2 → 0.4.3

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.
@@ -219,8 +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
+ const topColumnNames = [topGroupConfig.column];
223
+ const groupSorting = sorting.filter((s) => topColumnNames.includes(s.column));
224
224
  const summaryQuery = buildGroupSummaryQuery({
225
225
  ...querySource,
226
226
  grouping: [topGroupConfig],
@@ -296,8 +296,8 @@ async function fetchGroupChildren(group) {
296
296
  }));
297
297
  if (nextDepth < validGrouping.length) {
298
298
  const subGroupConfig = cleanAgg(validGrouping[nextDepth]);
299
- const groupedColumnNames = validGrouping.map((g) => g.column);
300
- const groupSorting = sorting.filter((s) => groupedColumnNames.includes(s.column));
299
+ const subColumnNames = validGrouping.slice(0, nextDepth + 1).map((g) => g.column);
300
+ const groupSorting = sorting.filter((s) => subColumnNames.includes(s.column));
301
301
  const summaryQuery = buildGroupSummaryQuery({
302
302
  ...querySource,
303
303
  grouping: [subGroupConfig],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shotleybuilder/svelte-gridlite-kit",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "description": "A SQL-native data grid component for Svelte and SvelteKit, powered by PGLite",
5
5
  "author": "Sertantai",
6
6
  "license": "MIT",