@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.js
CHANGED
|
@@ -191,7 +191,6 @@ function TeamStaffTable({
|
|
|
191
191
|
const [internalSorting, setInternalSorting] = useState(DEFAULT_SORT);
|
|
192
192
|
const activeSorting = sorting ?? internalSorting;
|
|
193
193
|
const handleSortingChange = onSortingChange ?? setInternalSorting;
|
|
194
|
-
const effectiveVirtualized = virtualized && !isSplitLayout;
|
|
195
194
|
const rows = useMemo(() => {
|
|
196
195
|
if (staff.length === 0) return [];
|
|
197
196
|
const grouped = /* @__PURE__ */ new Map();
|
|
@@ -227,7 +226,7 @@ function TeamStaffTable({
|
|
|
227
226
|
const { visibleItems, sentinelRef, hasMore } = useInfiniteList(rows, {
|
|
228
227
|
resetKey: `${staff.length}|${JSON.stringify(activeSorting)}`
|
|
229
228
|
});
|
|
230
|
-
const displayedRows =
|
|
229
|
+
const displayedRows = virtualized ? visibleItems : rows;
|
|
231
230
|
const columns = useMemo(() => {
|
|
232
231
|
const activate = (id) => onStaffClick?.(id);
|
|
233
232
|
const interactionProps = (id, ariaLabel) => interactive ? {
|
|
@@ -319,18 +318,18 @@ function TeamStaffTable({
|
|
|
319
318
|
loading,
|
|
320
319
|
emptyMessage: isError ? "Failed to load coaching staff. Please try again." : "No coaches found.",
|
|
321
320
|
pageSize: Math.max(displayedRows.length, 25),
|
|
322
|
-
hidePagination:
|
|
321
|
+
hidePagination: virtualized,
|
|
323
322
|
stickyHeader: true,
|
|
324
323
|
splitLayout: isSplitLayout,
|
|
325
324
|
numberOfColumns: 1,
|
|
326
325
|
splitLayoutGridCols: isCompact ? "!grid-cols-[minmax(120px,120px)_1fr]" : isSplitLayout ? "sm:!grid-cols-[minmax(220px,220px)_1fr]" : "",
|
|
327
|
-
containerClassName: cn3("border-0 rounded-none xl:h-full",
|
|
326
|
+
containerClassName: cn3("border-0 rounded-none xl:h-full", virtualized && "h-full"),
|
|
328
327
|
className: cn3(
|
|
329
328
|
"border-none xl:flex-1 xl:min-h-0 xl:overflow-hidden",
|
|
330
|
-
|
|
329
|
+
virtualized && "h-full min-h-0 w-full",
|
|
331
330
|
className
|
|
332
331
|
),
|
|
333
|
-
bottomContent:
|
|
332
|
+
bottomContent: virtualized && hasMore ? /* @__PURE__ */ jsx3("div", { ref: sentinelRef, className: "h-px w-full" }) : null,
|
|
334
333
|
getRowBanner: (row) => row.__isCategoryRow ? row.__categoryLabel : null,
|
|
335
334
|
bannerRowClassName: "bg-greys-background-hover hover:bg-greys-background-hover",
|
|
336
335
|
getRowClassName: (row) => row.__isCategoryRow ? "hidden" : ""
|