najm-kit 2.2.3 → 2.2.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.
- package/dist/index.mjs +4 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -12729,11 +12729,12 @@ function useTable(effectiveViewModeOverride) {
|
|
|
12729
12729
|
if (dynamicPageSizeTarget === storePagination.pageSize) return;
|
|
12730
12730
|
const reported = reportedGeometryRef.current;
|
|
12731
12731
|
if (reported?.key === geometryKey && reported.count >= MAX_PAGE_SIZE_REPORTS_PER_GEOMETRY) return;
|
|
12732
|
+
const delay = reported ? DYNAMIC_PAGE_SIZE_DEBOUNCE_MS : 0;
|
|
12732
12733
|
const timer = setTimeout(() => {
|
|
12733
12734
|
const current = reportedGeometryRef.current;
|
|
12734
12735
|
reportedGeometryRef.current = current?.key === geometryKey ? { key: geometryKey, count: current.count + 1 } : { key: geometryKey, count: 1 };
|
|
12735
12736
|
setPagination({ pageIndex: storePagination.pageIndex, pageSize: dynamicPageSizeTarget });
|
|
12736
|
-
},
|
|
12737
|
+
}, delay);
|
|
12737
12738
|
return () => clearTimeout(timer);
|
|
12738
12739
|
}, [
|
|
12739
12740
|
manualPagination,
|
|
@@ -13210,6 +13211,7 @@ function NDataCardShell({ row, onClick, onContextMenu, actions, children, classN
|
|
|
13210
13211
|
);
|
|
13211
13212
|
}
|
|
13212
13213
|
var DEFAULT_ROWS2 = 6;
|
|
13214
|
+
var UNMEASURED_DYNAMIC_ROWS = 32;
|
|
13213
13215
|
var DEFAULT_CARD_COUNT = 48;
|
|
13214
13216
|
function NTableCardSkeleton({ surface }) {
|
|
13215
13217
|
return /* @__PURE__ */ jsx(
|
|
@@ -13356,7 +13358,7 @@ function NTableLoadingSkeleton({ rows }) {
|
|
|
13356
13358
|
const userGetRowCanExpand = useTableStore.use.getRowCanExpand();
|
|
13357
13359
|
const hasExpansion = Boolean(renderSubRow || userGetRowCanExpand);
|
|
13358
13360
|
const loadingText = useTableStore.use.loadingText();
|
|
13359
|
-
const rowCount = rows ?? (dynamicHeight
|
|
13361
|
+
const rowCount = rows ?? (dynamicHeight ? bodyHeight > 0 ? skeletonRowCount : UNMEASURED_DYNAMIC_ROWS : DEFAULT_ROWS2);
|
|
13360
13362
|
const renderHeaderLabel = (header) => typeof header === "string" ? header : null;
|
|
13361
13363
|
return /* @__PURE__ */ jsxs("div", { className: "flex min-h-0 flex-1 flex-col gap-2", children: [
|
|
13362
13364
|
/* @__PURE__ */ jsx(NTableHeaderSkeleton, {}),
|