Skip to main content
zerotal

Documentation


Documentation / @zerotal/inertia / InfiniteScrollProp

Class: InfiniteScrollProp

Defined in: inertia/src/props/PropTypes.ts:212

scroll(paginator) — an infinite-scroll prop. The page's paginated data is merged (the client appends/prepends new pages) and the page object carries a scrollProps entry describing the current/next/previous page so the <InfiniteScroll> component knows when to load more.

Extends

Constructors

Constructor

new InfiniteScrollProp(value, pageName?, dataPath?): InfiniteScrollProp

Defined in: inertia/src/props/PropTypes.ts:213

Parameters

value

PropFactory | PaginatorLike

pageName?

string = "page"

dataPath?

string = "data"

Returns

InfiniteScrollProp

Overrides

InertiaProp.constructor

Properties

_once

protected _once: boolean = false

Defined in: inertia/src/props/PropTypes.ts:34

Inherited from

InertiaProp._once


_onceExpiresAt

protected _onceExpiresAt: number | null = null

Defined in: inertia/src/props/PropTypes.ts:35

Inherited from

InertiaProp._onceExpiresAt


_merge

protected _merge: boolean = false

Defined in: inertia/src/props/PropTypes.ts:37

Inherited from

InertiaProp._merge


_deep

protected _deep: boolean = false

Defined in: inertia/src/props/PropTypes.ts:38

Inherited from

InertiaProp._deep


_appendPaths

protected _appendPaths: string[] = []

Defined in: inertia/src/props/PropTypes.ts:39

Inherited from

InertiaProp._appendPaths


_prependPaths

protected _prependPaths: string[] = []

Defined in: inertia/src/props/PropTypes.ts:40

Inherited from

InertiaProp._prependPaths


_matchOn

protected _matchOn: string[] = []

Defined in: inertia/src/props/PropTypes.ts:41

Inherited from

InertiaProp._matchOn


_prependRoot

protected _prependRoot: boolean = false

Defined in: inertia/src/props/PropTypes.ts:42

Inherited from

InertiaProp._prependRoot


ignoreFirstLoad

readonly ignoreFirstLoad: boolean = false

Defined in: inertia/src/props/PropTypes.ts:45

When true, the prop is skipped on full/initial visits and only resolved on partial reloads.

Inherited from

InertiaProp.ignoreFirstLoad


pageName

readonly pageName: string = "page"

Defined in: inertia/src/props/PropTypes.ts:215


dataPath

readonly dataPath: string = "data"

Defined in: inertia/src/props/PropTypes.ts:216

Accessors

isOnce

Get Signature

get isOnce(): boolean

Defined in: inertia/src/props/PropTypes.ts:58

Returns

boolean

Inherited from

InertiaProp.isOnce


onceExpiresAt

Get Signature

get onceExpiresAt(): number | null

Defined in: inertia/src/props/PropTypes.ts:61

Returns

number | null

Inherited from

InertiaProp.onceExpiresAt


shouldMerge

Get Signature

get shouldMerge(): boolean

Defined in: inertia/src/props/PropTypes.ts:97

Returns

boolean

Inherited from

InertiaProp.shouldMerge

Methods

once()

once(expiresAt?): this

Defined in: inertia/src/props/PropTypes.ts:53

Resolve only once; the client remembers the value across subsequent navigations.

Parameters

expiresAt?

number | null

Returns

this

Inherited from

InertiaProp.once


merge()

merge(): this

Defined in: inertia/src/props/PropTypes.ts:68

Append new items to the existing array at the root level on partial reloads.

Returns

this

Inherited from

InertiaProp.merge


deepMerge()

deepMerge(): this

Defined in: inertia/src/props/PropTypes.ts:73

Deep-merge the whole structure into the existing prop value on partial reloads.

Returns

this

Inherited from

InertiaProp.deepMerge


append()

append(paths?): this

Defined in: inertia/src/props/PropTypes.ts:79

Append to specific nested path(s) of the prop, replacing the rest.

Parameters

paths?

string | string[]

Returns

this

Inherited from

InertiaProp.append


prepend()

prepend(paths?): this

Defined in: inertia/src/props/PropTypes.ts:85

Prepend at the root (no args) or to specific nested path(s).

Parameters

paths?

string | string[]

Returns

this

Inherited from

InertiaProp.prepend


matchOn()

matchOn(paths): this

Defined in: inertia/src/props/PropTypes.ts:92

Match existing items by a field (path's last segment) instead of appending duplicates.

Parameters

paths

string | string[]

Returns

this

Inherited from

InertiaProp.matchOn


mergeConfig()

mergeConfig(): MergeConfig

Defined in: inertia/src/props/PropTypes.ts:100

Returns

MergeConfig

Inherited from

InertiaProp.mergeConfig


resolve()

resolve(): unknown

Defined in: inertia/src/props/PropTypes.ts:223

Produce the prop's value (may be async).

Returns

unknown

Overrides

InertiaProp.resolve


scrollConfig()

scrollConfig(resolved): ScrollConfig

Defined in: inertia/src/props/PropTypes.ts:228

Compute the scrollProps entry from the resolved paginator value.

Parameters

resolved

unknown

Returns

ScrollConfig