Partial reloads
Reload only the props a page needs with only and except filters.
On this page
The Inertia client can reload the current page and ask for a subset of its props. This is how deferred props, polling and infinite scroll work, and you can use it directly for dashboard refresh buttons and filters. To refresh props when something changes on the server, without polling, use live props.
From the client
router.visit('/users', { only: ['users'] }) works for a new page too. The client sends:
Filtering applies only when the partial component equals the component being rendered.
Server behavior
- Paths are dot paths and match on a
.boundary.only: ["user"]includesuser.name;only: ["user.name"]includesuser.nameand keepsuseras a container. exceptbeatsonly.Always(...)ignores both.- The children of a value produced by a loader are not filtered. Nested literal
InertiaPropsare. - Loaders of excluded props never run.
- Selecting an array descendant (
rows.1.extra) reloads the complete array, including sibling fields and nested loaders. A descendantexceptexcludes the entire array;Alwaysstill wins. - Omitted or rescued direct array elements retain their positions as
null. - A missing or empty list header means “no filter”, which differs from an empty list.
Always wins
Always(...) is sent even when a partial reload does not ask for it. Use it for props the page cannot render without; do not use it for expensive data.
What the client keeps
A reloaded prop replaces the client's value by default. A prop resolved from a loader is sent in full. To combine values instead, use merge props.
Deferred and once props
Deferred props are loaded through partial reloads. X-Inertia-Partial-Data asks for the deferred group, and the server records which deferred props it has sent.
Once props that the reload asks for always resolve. The client sends X-Inertia-Except-Once-Props with the keys it already holds, so the server can skip them while keeping the onceProps metadata.
Testing partial reloads
Inertia.Net.Testing replays the request with the right headers:
ReloadOnlyAsync asserts that the requested prop is present; ReloadExceptAsync asserts that it is missing.