@joewinke/jatui 0.5.2 → 0.5.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.
@@ -32,11 +32,22 @@
32
32
  // ── State ──────────────────────────────────────────────────────────────
33
33
  let sorting = $state<SortingState>([]);
34
34
  let rowSelection = $state<RowSelectionState>({});
35
+ // svelte-ignore state_referenced_locally
35
36
  let pagination = $state<PaginationState>({ pageIndex: 0, pageSize });
36
37
 
38
+ // Reset to the first page whenever the data set changes.
39
+ //
40
+ // This must NOT read `pagination`. It used to preserve the current page size
41
+ // with `pageSize: pagination.pageSize`, which made the effect its own
42
+ // dependency — assigning a fresh object re-dirtied the state it had just read,
43
+ // so EVERY mount (paginated or not) died with effect_update_depth_exceeded
44
+ // during hydration and took the rest of the page's hydration with it
45
+ // (mos-9i88e.26: /admin/contacts, /admin/vendors, /admin/fleet-health).
46
+ // `pageSize` is a prop, never written here, so tracking it is safe — and it
47
+ // also fixes the page size being frozen at its initial value.
37
48
  $effect(() => {
38
49
  void data;
39
- pagination = { pageIndex: 0, pageSize: pagination.pageSize };
50
+ pagination = { pageIndex: 0, pageSize };
40
51
  });
41
52
 
42
53
  const checkboxCol: ColumnDef<AnyData, unknown> = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@joewinke/jatui",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "private": false,
5
5
  "description": "Shared Svelte 5 component library for JAT projects",
6
6
  "type": "module",