diff --git a/src/components/TablePagination.tsx b/src/components/TablePagination.tsx index 46b1cc4..51a5d59 100644 --- a/src/components/TablePagination.tsx +++ b/src/components/TablePagination.tsx @@ -37,6 +37,7 @@ export type TablePaginationProps< pagination: Pagination & { count?: number; maxLimit?: number }, ) => ReactNode useLazyListQuery: TypedUseLazyQuery + preferCacheValue?: boolean filters?: Omit rowsPerPageOptions?: number[] stackProps?: StackProps @@ -53,6 +54,7 @@ const TablePagination = < >({ children, useLazyListQuery, + preferCacheValue, filters, page: initialPage = 0, rowsPerPage: initialLimit = 50, @@ -72,8 +74,8 @@ const TablePagination = < }) useEffect(() => { - trigger({ limit, offset, ...filters } as QueryArg) - }, [trigger, limit, offset, filters]) + trigger({ limit, offset, ...filters } as QueryArg, preferCacheValue) + }, [trigger, limit, offset, filters, preferCacheValue]) const { count, max_limit } = result.data || {}