feat(pagination): add pagination state management and cursor handling
This commit is contained in:
@@ -64,18 +64,20 @@ export interface GriddyStoreState extends GriddyUIState {
|
||||
onSortingChange?: (sorting: SortingState) => void;
|
||||
overscan?: number;
|
||||
pagination?: PaginationConfig;
|
||||
paginationState?: { pageIndex: number; pageSize: number };
|
||||
persistenceKey?: string;
|
||||
rowHeight?: number;
|
||||
rowSelection?: RowSelectionState;
|
||||
|
||||
rowSelection?: RowSelectionState;
|
||||
search?: SearchConfig;
|
||||
selection?: SelectionConfig;
|
||||
setData: (data: any[]) => void;
|
||||
setDataCount: (count: number) => void;
|
||||
setError: (error: Error | null) => void;
|
||||
setInfiniteScroll: (config: InfiniteScrollConfig | undefined) => void;
|
||||
|
||||
setInfiniteScroll: (config: InfiniteScrollConfig | undefined) => void;
|
||||
setIsLoading: (loading: boolean) => void;
|
||||
setPaginationState: (state: { pageIndex: number; pageSize: number }) => void;
|
||||
setScrollRef: (el: HTMLDivElement | null) => void;
|
||||
// ─── Internal ref setters ───
|
||||
setTable: (table: Table<any>) => void;
|
||||
@@ -131,6 +133,7 @@ export const { Provider: GriddyProvider, useStore: useGriddyStore } = createSync
|
||||
setFocusedRow: (index) => set({ focusedRowIndex: index }),
|
||||
setInfiniteScroll: (config) => set({ infiniteScroll: config }),
|
||||
setIsLoading: (loading) => set({ isLoading: loading }),
|
||||
setPaginationState: (state) => set({ paginationState: state }),
|
||||
setScrollRef: (el) => set({ _scrollRef: el }),
|
||||
|
||||
setSearchOpen: (open) => set({ isSearchOpen: open }),
|
||||
|
||||
Reference in New Issue
Block a user