@ai-matrx/design-system 0.17.1 → 0.17.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/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.17.2 — 2026-09-12
4
+
5
+ `MatrxDataTable` now resets the vertical scroll position of both its desktop
6
+ table and mobile card scrollers before paint when a non-initial
7
+ `controlled-append` source key changes. Same-source appends and horizontal
8
+ scroll position remain untouched in both automatic and manual modes.
9
+
10
+ ### Consumer action
11
+
12
+ Update to 0.17.2 so refreshed or replaced append sources begin at their first
13
+ row instead of retaining the previous source's bottom position. No API or
14
+ configuration change is required.
15
+
3
16
  ## 0.17.1 — 2026-09-12
4
17
 
5
18
  `useScrollPagination` now retains each container's last observed scroll position
@@ -5469,6 +5469,16 @@ function MatrxDataTableCore({
5469
5469
  ]);
5470
5470
  const scrollRef = (0, import_react14.useRef)(null);
5471
5471
  const cardsScrollRef = (0, import_react14.useRef)(null);
5472
+ const previousAppendKeyForScrollReset = (0, import_react14.useRef)(appendQueryKey);
5473
+ (0, import_react14.useLayoutEffect)(() => {
5474
+ const previous = previousAppendKeyForScrollReset.current;
5475
+ previousAppendKeyForScrollReset.current = appendQueryKey;
5476
+ if (previous === null || appendQueryKey === null || previous === appendQueryKey) {
5477
+ return;
5478
+ }
5479
+ if (scrollRef.current) scrollRef.current.scrollTop = 0;
5480
+ if (cardsScrollRef.current) cardsScrollRef.current.scrollTop = 0;
5481
+ }, [appendQueryKey]);
5472
5482
  const scrollPagination = useScrollPagination({
5473
5483
  containers: [scrollRef, cardsScrollRef],
5474
5484
  queryKey: appendQuery?.pagination.queryKey ?? "",