najm-kit 2.11.8 → 2.11.9
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 +19 -0
- package/dist/index.mjs +6 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.11.9 - 2026-08-30
|
|
4
|
+
|
|
5
|
+
- Fixed card grids that paginate client-side rendering their entire dataset on
|
|
6
|
+
one page. `useTable` pinned an uncontrolled paged card list to `data.length`,
|
|
7
|
+
a branch that predates the container measurement added in 2.2.0 and was never
|
|
8
|
+
reconciled with it: `calculatedCardPageSize` was measured and published, but
|
|
9
|
+
only ever applied to a server-paginated grid. A 500-row list rendered 500
|
|
10
|
+
cards on page one, reported a single page, and showed 500 as the current
|
|
11
|
+
Rows/page value. The measured size is now applied to an uncontrolled card grid
|
|
12
|
+
too, through the guards that already keep a server-paginated one stable —
|
|
13
|
+
geometry bucketing, the per-container report budget, and the deferral until
|
|
14
|
+
real cards have been measured. That loop is a property of the measurement
|
|
15
|
+
rather than of fetching: page size decides which cards render, and rendered
|
|
16
|
+
cards are what card height is measured from. Rendering every supplied row
|
|
17
|
+
stays the behavior wherever there is nothing to measure against, so
|
|
18
|
+
`dynamicHeight={false}` and a container that has not yet reported a layout are
|
|
19
|
+
unchanged, and a controlled `pagination` prop or an explicit Rows/page choice
|
|
20
|
+
still wins.
|
|
21
|
+
|
|
3
22
|
## 2.11.8 - 2026-08-28
|
|
4
23
|
|
|
5
24
|
- Fixed `NContextMenu` leaving keyboard focus on its opener after the menu
|
package/dist/index.mjs
CHANGED
|
@@ -12207,15 +12207,17 @@ function useTable(effectiveViewModeOverride) {
|
|
|
12207
12207
|
useLayoutEffect(() => {
|
|
12208
12208
|
if (manualPagination || isPaginationControlled || isPageSizeUserSelected) return;
|
|
12209
12209
|
if (dynamicHeight && renderedMode === "table") table.setPageSize(calculatedPageSize);
|
|
12210
|
-
|
|
12210
|
+
const cardsAreUnmeasured = !dynamicHeight || !hasMeasuredLayout;
|
|
12211
|
+
if (viewMode === "cards" && cardPagination.mode === "paged" && cardsAreUnmeasured) {
|
|
12211
12212
|
table.setPageSize(data.length || 9999);
|
|
12212
12213
|
}
|
|
12213
|
-
}, [calculatedPageSize, dynamicHeight, renderedMode, viewMode, cardPagination.mode, table, data.length, manualPagination, isPaginationControlled, isPageSizeUserSelected]);
|
|
12214
|
+
}, [calculatedPageSize, dynamicHeight, hasMeasuredLayout, renderedMode, viewMode, cardPagination.mode, table, data.length, manualPagination, isPaginationControlled, isPageSizeUserSelected]);
|
|
12214
12215
|
const dynamicPageSizeTarget = renderedMode === "cards" ? calculatedCardPageSize : calculatedPageSize;
|
|
12215
12216
|
const geometryKey = `${Math.round(measuredBodyWidth / GEOMETRY_BUCKET_PX)}x${Math.round(measuredBodyHeight / GEOMETRY_BUCKET_PX)}`;
|
|
12216
12217
|
const reportedGeometryRef = useRef(null);
|
|
12217
12218
|
useLayoutEffect(() => {
|
|
12218
|
-
if (!
|
|
12219
|
+
if (!dynamicHeight || isPageSizeUserSelected) return;
|
|
12220
|
+
if (!manualPagination && (isPaginationControlled || renderedMode !== "cards")) return;
|
|
12219
12221
|
if (cardPagination.mode !== "paged") return;
|
|
12220
12222
|
if (!hasMeasuredLayout || measuredBodyHeight <= 0) return;
|
|
12221
12223
|
if (!dynamicPageSizeTarget || dynamicPageSizeTarget < 1) return;
|
|
@@ -12237,6 +12239,7 @@ function useTable(effectiveViewModeOverride) {
|
|
|
12237
12239
|
return () => clearTimeout(timer);
|
|
12238
12240
|
}, [
|
|
12239
12241
|
manualPagination,
|
|
12242
|
+
isPaginationControlled,
|
|
12240
12243
|
dynamicHeight,
|
|
12241
12244
|
isPageSizeUserSelected,
|
|
12242
12245
|
cardPagination.mode,
|