Documentation / @zerotal/inertia / DeferProp
Class: DeferProp
Defined in: inertia/src/props/PropTypes.ts:155
defer(fn, group?, { rescue }) — excluded from the initial render and listed under
deferredProps[group]; the client fetches it in a follow-up partial reload. With rescue: true,
a thrown error is swallowed and the key is reported in rescuedProps.
Extends
Constructors
Constructor
new DeferProp(
callback,group?,rescue?):DeferProp
Defined in: inertia/src/props/PropTypes.ts:157
Parameters
callback
group?
string = "default"
rescue?
boolean = false
Returns
DeferProp
Overrides
Properties
_once
protected_once:boolean=false
Defined in: inertia/src/props/PropTypes.ts:34
Inherited from
_onceExpiresAt
protected_onceExpiresAt:number|null=null
Defined in: inertia/src/props/PropTypes.ts:35
Inherited from
_merge
protected_merge:boolean=false
Defined in: inertia/src/props/PropTypes.ts:37
Inherited from
_deep
protected_deep:boolean=false
Defined in: inertia/src/props/PropTypes.ts:38
Inherited from
_appendPaths
protected_appendPaths:string[] =[]
Defined in: inertia/src/props/PropTypes.ts:39
Inherited from
_prependPaths
protected_prependPaths:string[] =[]
Defined in: inertia/src/props/PropTypes.ts:40
Inherited from
_matchOn
protected_matchOn:string[] =[]
Defined in: inertia/src/props/PropTypes.ts:41
Inherited from
_prependRoot
protected_prependRoot:boolean=false
Defined in: inertia/src/props/PropTypes.ts:42
Inherited from
ignoreFirstLoad
readonlyignoreFirstLoad:true=true
Defined in: inertia/src/props/PropTypes.ts:156
When true, the prop is skipped on full/initial visits and only resolved on partial reloads.
Overrides
group
readonlygroup:string="default"
Defined in: inertia/src/props/PropTypes.ts:159
rescue
readonlyrescue:boolean=false
Defined in: inertia/src/props/PropTypes.ts:160
Accessors
isOnce
Get Signature
get isOnce():
boolean
Defined in: inertia/src/props/PropTypes.ts:58
Returns
boolean
Inherited from
onceExpiresAt
Get Signature
get onceExpiresAt():
number|null
Defined in: inertia/src/props/PropTypes.ts:61
Returns
number | null
Inherited from
shouldMerge
Get Signature
get shouldMerge():
boolean
Defined in: inertia/src/props/PropTypes.ts:97
Returns
boolean
Inherited from
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
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
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
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
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
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
mergeConfig()
mergeConfig():
MergeConfig
Defined in: inertia/src/props/PropTypes.ts:100
Returns
Inherited from
resolve()
resolve():
unknown
Defined in: inertia/src/props/PropTypes.ts:164
Produce the prop's value (may be async).
Returns
unknown