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

Function hasPreviousPage

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

Source from the content-addressed store, hash-verified

200 * `undefined`.
201 */
202export function hasPreviousPage(
203 options: InfiniteQueryPageParamsOptions<any, any>,
204 data?: InfiniteData<unknown>,
205): boolean {
206 if (!data || !options.getPreviousPageParam) return false
207 return getPreviousPageParam(options, data) != null
208}

Callers 1

createResultMethod · 0.90

Calls 1

getPreviousPageParamFunction · 0.85

Tested by

no test coverage detected