@nukleus-sports/ui-patterns 0.7.0 → 0.7.1
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/team.cjs +5 -6
- package/dist/team.cjs.map +1 -1
- package/dist/team.js +5 -6
- package/dist/team.js.map +1 -1
- package/package.json +3 -3
package/dist/team.cjs
CHANGED
|
@@ -448,7 +448,6 @@ function TeamStaffTable({
|
|
|
448
448
|
const [internalSorting, setInternalSorting] = (0, import_react.useState)(DEFAULT_SORT);
|
|
449
449
|
const activeSorting = sorting ?? internalSorting;
|
|
450
450
|
const handleSortingChange = onSortingChange ?? setInternalSorting;
|
|
451
|
-
const effectiveVirtualized = virtualized && !isSplitLayout;
|
|
452
451
|
const rows = (0, import_react.useMemo)(() => {
|
|
453
452
|
if (staff.length === 0) return [];
|
|
454
453
|
const grouped = /* @__PURE__ */ new Map();
|
|
@@ -484,7 +483,7 @@ function TeamStaffTable({
|
|
|
484
483
|
const { visibleItems, sentinelRef, hasMore } = (0, import_ui_web4.useInfiniteList)(rows, {
|
|
485
484
|
resetKey: `${staff.length}|${JSON.stringify(activeSorting)}`
|
|
486
485
|
});
|
|
487
|
-
const displayedRows =
|
|
486
|
+
const displayedRows = virtualized ? visibleItems : rows;
|
|
488
487
|
const columns = (0, import_react.useMemo)(() => {
|
|
489
488
|
const activate = (id) => onStaffClick?.(id);
|
|
490
489
|
const interactionProps = (id, ariaLabel) => interactive ? {
|
|
@@ -576,18 +575,18 @@ function TeamStaffTable({
|
|
|
576
575
|
loading,
|
|
577
576
|
emptyMessage: isError ? "Failed to load coaching staff. Please try again." : "No coaches found.",
|
|
578
577
|
pageSize: Math.max(displayedRows.length, 25),
|
|
579
|
-
hidePagination:
|
|
578
|
+
hidePagination: virtualized,
|
|
580
579
|
stickyHeader: true,
|
|
581
580
|
splitLayout: isSplitLayout,
|
|
582
581
|
numberOfColumns: 1,
|
|
583
582
|
splitLayoutGridCols: isCompact ? "!grid-cols-[minmax(120px,120px)_1fr]" : isSplitLayout ? "sm:!grid-cols-[minmax(220px,220px)_1fr]" : "",
|
|
584
|
-
containerClassName: (0, import_ui_web4.cn)("border-0 rounded-none xl:h-full",
|
|
583
|
+
containerClassName: (0, import_ui_web4.cn)("border-0 rounded-none xl:h-full", virtualized && "h-full"),
|
|
585
584
|
className: (0, import_ui_web4.cn)(
|
|
586
585
|
"border-none xl:flex-1 xl:min-h-0 xl:overflow-hidden",
|
|
587
|
-
|
|
586
|
+
virtualized && "h-full min-h-0 w-full",
|
|
588
587
|
className
|
|
589
588
|
),
|
|
590
|
-
bottomContent:
|
|
589
|
+
bottomContent: virtualized && hasMore ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { ref: sentinelRef, className: "h-px w-full" }) : null,
|
|
591
590
|
getRowBanner: (row) => row.__isCategoryRow ? row.__categoryLabel : null,
|
|
592
591
|
bannerRowClassName: "bg-greys-background-hover hover:bg-greys-background-hover",
|
|
593
592
|
getRowClassName: (row) => row.__isCategoryRow ? "hidden" : ""
|