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

Function hasPreviousPage

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

Source from the content-addressed store, hash-verified

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

Callers 1

createResultMethod · 0.90

Calls 1

getPreviousPageParamFunction · 0.85

Tested by

no test coverage detected