@eml-payments/ui-kit 1.2.4 → 1.2.6
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.
|
@@ -39,7 +39,7 @@ export function useTableController({ id, height, data, columns, checkboxSelectio
|
|
|
39
39
|
columns: tableColumns,
|
|
40
40
|
getRowId: (row) => String(row[rowIdKey]),
|
|
41
41
|
state: {
|
|
42
|
-
pagination: {
|
|
42
|
+
...(isInfinite ? {} : { pagination: { pageIndex, pageSize } }),
|
|
43
43
|
sorting: sorting !== null && sorting !== void 0 ? sorting : internalSorting,
|
|
44
44
|
rowSelection: internalRowSelection,
|
|
45
45
|
grouping: stableGrouping,
|
|
@@ -52,6 +52,8 @@ export function useTableController({ id, height, data, columns, checkboxSelectio
|
|
|
52
52
|
autoResetPageIndex: false,
|
|
53
53
|
pageCount: !isInfinite && paginationMode === 'server' ? Math.ceil((totalServerRows !== null && totalServerRows !== void 0 ? totalServerRows : 0) / pageSize) : undefined,
|
|
54
54
|
onPaginationChange: (updater) => {
|
|
55
|
+
if (isInfinite)
|
|
56
|
+
return;
|
|
55
57
|
const next = typeof updater === 'function' ? updater({ pageIndex, pageSize }) : updater;
|
|
56
58
|
setPageIndex(next.pageIndex);
|
|
57
59
|
setPageSize(next.pageSize);
|
|
@@ -79,12 +81,6 @@ export function useTableController({ id, height, data, columns, checkboxSelectio
|
|
|
79
81
|
setPageIndex(0);
|
|
80
82
|
}
|
|
81
83
|
}, [paginationMode, setPageIndex]);
|
|
82
|
-
useEffect(() => {
|
|
83
|
-
if (isInfinite) {
|
|
84
|
-
table.setPageIndex(0);
|
|
85
|
-
table.setPageSize(Number.MAX_SAFE_INTEGER);
|
|
86
|
-
}
|
|
87
|
-
}, [isInfinite, table]);
|
|
88
84
|
const pagination = usePaginationController({
|
|
89
85
|
table,
|
|
90
86
|
paginationMode,
|
|
@@ -12,7 +12,7 @@ export const Default = {
|
|
|
12
12
|
render: () => (_jsx(TooltipStoryWrapper, { content: "Simple tooltip", children: _jsx(Button, { children: "Hover me" }) })),
|
|
13
13
|
};
|
|
14
14
|
export const LongTextResponsive = {
|
|
15
|
-
render: () => (_jsx(TooltipStoryWrapper, { content: "This tooltip contains a longer message that wraps gracefully across multiple lines. On smaller\
|
|
15
|
+
render: () => (_jsx(TooltipStoryWrapper, { content: "This tooltip contains a longer message that wraps gracefully across multiple lines. On smaller\n\t\tscreens, it narrows and stacks vertically so it's easier to read\u2014especially useful for\n\t\taccessibility, mobile devices, or multi-language support.", side: "top", children: _jsx(Button, { children: "Hover me" }) })),
|
|
16
16
|
};
|
|
17
17
|
export const OnDifferentSides = {
|
|
18
18
|
render: () => (_jsxs("div", { className: "grid grid-cols-2 gap-4", children: [_jsx(TooltipStoryWrapper, { content: "Top tooltip", side: "top", children: _jsx(Button, { children: "Top" }) }), _jsx(TooltipStoryWrapper, { content: "Bottom tooltip", side: "bottom", children: _jsx(Button, { children: "Bottom" }) }), _jsx(TooltipStoryWrapper, { content: "Left tooltip", side: "left", children: _jsx(Button, { children: "Left" }) }), _jsx(TooltipStoryWrapper, { content: "Right tooltip", side: "right", children: _jsx(Button, { children: "Right" }) })] })),
|