Skip to content
module@warp-drive/core/signals/-leaked

Interface PaginationSubscription<RT, E> sincev5.9.0

Defined in: warp-drive-packages/core/src/signals/pagination-subscription.ts:102

Hideconstructor

Lifecycle glue for the <Paginate /> component. Owns the initial RequestSubscription (loading/error state, autorefresh, disposal) and the per-component PaginationState that it hands to the component.

Type Parameters

RT

RT

E

E

Methods

(symbol) dispose()

ts
(symbol) dispose(): void;

Defined in: warp-drive-packages/core/src/signals/pagination-subscription.ts:107

The method to call when the component this subscription is attached to unmounts.

Returns

void

Properties

store

ts
store: 
  | Store
  | RequestManager;

Defined in: warp-drive-packages/core/src/signals/pagination-subscription.ts:130

The Store this subscription subscribes to or the RequestManager which issues this request.

contentFeatures

Get Signature

ts
get contentFeatures(): PaginationContentFeatures<RT>;

Defined in: warp-drive-packages/core/src/signals/pagination-subscription.ts:360

Content features to yield to the content slot of a component

Returns

PaginationContentFeatures<RT>


errorFeatures

Get Signature

ts
get errorFeatures(): ErrorFeatures;

Defined in: warp-drive-packages/core/src/signals/pagination-subscription.ts:348

Error features to yield to the error slot of a component

Returns

ErrorFeatures


isCancelled

Get Signature

ts
get isCancelled(): boolean;

Defined in: warp-drive-packages/core/src/signals/pagination-subscription.ts:324

Whether the initial request was cancelled (aborted).

Returns

boolean


isError

Get Signature

ts
get isError(): boolean;

Defined in: warp-drive-packages/core/src/signals/pagination-subscription.ts:332

Whether the initial request rejected with an error.

Returns

boolean


isIdle

Get Signature

ts
get isIdle(): boolean;

Defined in: warp-drive-packages/core/src/signals/pagination-subscription.ts:265

Whether there is no request or query to monitor, so the component has nothing to load.

Returns

boolean


isLoading

Get Signature

ts
get isLoading(): boolean;

Defined in: warp-drive-packages/core/src/signals/pagination-subscription.ts:282

Whether the collection is still blocking-loading: no PaginationState has finished setting up yet. Only the very first page load (or the reset to a different collection) blocks here — extending the collection with loadNext/loadPrev does not, and neither does a changed @request arg while a collection is already on screen (that is isNavigating).

Remains true for the moment between the request resolving and the paginationState finishing its setup from the response, so that isSuccess consumers never see a success state with an empty pagination surface.

Returns

boolean


isNavigating

Get Signature

ts
get isNavigating(): boolean;

Defined in: warp-drive-packages/core/src/signals/pagination-subscription.ts:295

Whether a changed @request arg is resolving while a collection is already on screen — route-driven navigation, e.g. the browser back button. The content stays rendered (see isSuccess); consumers can use this to show a lightweight navigation indicator, the same way a loadPage call surfaces through the active page's request state.

Returns

boolean


isSuccess

Get Signature

ts
get isSuccess(): boolean;

Defined in: warp-drive-packages/core/src/signals/pagination-subscription.ts:315

Whether the component has a set-up paginationState to render and the current request did not fail. Stays true while a changed @request arg resolves (isNavigating), so the existing content keeps rendering instead of falling back to a blocking loading state.

Returns

boolean


loadingState

Get Signature

ts
get loadingState(): RequestLoadingState;

Defined in: warp-drive-packages/core/src/signals/pagination-subscription.ts:304

The RequestLoadingState for the initial request, for building UIs that respond to download progress.

Returns

RequestLoadingState


paginationState

Get Signature

ts
get paginationState(): PaginationState<RT, E>;

Defined in: warp-drive-packages/core/src/signals/pagination-subscription.ts:197

The per-component pagination state yielded to the component.

Keyed to the request that started the collection, not the current @request arg: when the arg changes, the existing state keeps rendering while _resolveNavigation resolves the new request in the background. A request that resolves to a page of the same collection is adopted into this state as the new active page (route-driven navigation, e.g. the browser back button); one that resolves to a different collection swaps in a fresh state (a true reset).

A background refresh does not swap the request, so the pagination state is stable across refreshes.

Returns

PaginationState<RT, E>


reason

Get Signature

ts
get reason(): 
  | StructuredErrorDocument<E>
  | null;

Defined in: warp-drive-packages/core/src/signals/pagination-subscription.ts:340

The error the initial request rejected with, or null if it did not reject.

Returns

| StructuredErrorDocument<E> | null

Released under the MIT License.