MCPcopy Create free account
hub / github.com/TanStack/query / hasPreviousPage

Function hasPreviousPage

packages/query-core/src/infiniteQueryBehavior.ts:170–176  ·  view source on GitHub ↗
(
  options: InfiniteQueryPageParamsOptions<any, any>,
  data?: InfiniteData<unknown>,
)

Source from the content-addressed store, hash-verified

168 * Checks if there is a previous page.
169 */
170export function hasPreviousPage(
171 options: InfiniteQueryPageParamsOptions<any, any>,
172 data?: InfiniteData<unknown>,
173): boolean {
174 if (!data || !options.getPreviousPageParam) return false
175 return getPreviousPageParam(options, data) != null
176}

Callers 1

createResultMethod · 0.90

Calls 1

getPreviousPageParamFunction · 0.85

Tested by

no test coverage detected