@eml-payments/ui-kit 1.2.5 → 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: { pageSize, pageIndex },
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]);
88
84
  const pagination = usePaginationController({
89
85
  table,
90
86
  paginationMode,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eml-payments/ui-kit",
3
- "version": "1.2.5",
3
+ "version": "1.2.6",
4
4
  "private": false,
5
5
  "description": "ARLO UIKit",
6
6
  "homepage": "https://github.com/EML-Payments/arlo.npm.uikit#readme",