zaravand-ui 5.0.0 → 5.0.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.
@@ -164,6 +164,14 @@ export interface TableProps {
164
164
  isMutating?: boolean;
165
165
  stickyHeaderOnScroll?: boolean;
166
166
  maxVisibleRowsBeforeScroll?: number;
167
+ /**
168
+ * Whether the user may switch the table into infinite-scroll mode.
169
+ * Defaults to `true` (both modes, with the pagination/infinite toggle
170
+ * button). When `false`, the toggle button is not rendered and the table
171
+ * always stays in regular pagination mode — so `onPageChange` is only ever
172
+ * called with `mode: "pagination"` and `onLoadMore` is never called.
173
+ */
174
+ allowInfiniteMode?: boolean;
167
175
  schema: TableSchema;
168
176
  data: DynamicTableRow[];
169
177
  setData: React.Dispatch<React.SetStateAction<DynamicTableRow[]>>;
@@ -9,6 +9,7 @@ type UseTablePaginationInput = {
9
9
  searchKey: string;
10
10
  sortKey: string;
11
11
  maxVisibleRowsBeforeScroll?: number;
12
+ allowInfiniteMode: boolean;
12
13
  };
13
14
  type UseTablePaginationResult = {
14
15
  pagingMode: TablePagingMode;
@@ -33,5 +34,5 @@ type UseTablePaginationResult = {
33
34
  handleTableScrollViewport: (event: React.UIEvent<HTMLDivElement>) => void;
34
35
  isInfiniteRequestPending: boolean;
35
36
  };
36
- export declare function useTablePagination({ hasChildren, filteredRows, paginationConfig, loading, isRowActionBusy, searchKey, sortKey, maxVisibleRowsBeforeScroll, }: UseTablePaginationInput): UseTablePaginationResult;
37
+ export declare function useTablePagination({ hasChildren, filteredRows, paginationConfig, loading, isRowActionBusy, searchKey, sortKey, maxVisibleRowsBeforeScroll, allowInfiniteMode, }: UseTablePaginationInput): UseTablePaginationResult;
37
38
  export {};