@shotleybuilder/svelte-gridlite-kit 0.4.2 → 0.4.4

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],
@@ -279,6 +279,7 @@ async function rebuildGroupedQuery() {
279
279
  await fetchGroupChildren(group);
280
280
  }
281
281
  }
282
+ storeState = { ...storeState, loading: false };
282
283
  } catch (err) {
283
284
  error = err instanceof Error ? err.message : String(err);
284
285
  }
@@ -296,8 +297,8 @@ async function fetchGroupChildren(group) {
296
297
  }));
297
298
  if (nextDepth < validGrouping.length) {
298
299
  const subGroupConfig = cleanAgg(validGrouping[nextDepth]);
299
- const groupedColumnNames = validGrouping.map((g) => g.column);
300
- const groupSorting = sorting.filter((s) => groupedColumnNames.includes(s.column));
300
+ const subColumnNames = validGrouping.slice(0, nextDepth + 1).map((g) => g.column);
301
+ const groupSorting = sorting.filter((s) => subColumnNames.includes(s.column));
301
302
  const summaryQuery = buildGroupSummaryQuery({
302
303
  ...querySource,
303
304
  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.4",
4
4
  "description": "A SQL-native data grid component for Svelte and SvelteKit, powered by PGLite",
5
5
  "author": "Sertantai",
6
6
  "license": "MIT",