PaginationActions (Commerce Engine)

This is for:

Developer

The pagination action creators.

Loader Function

loadPaginationActions

Loads the commerce pagination reducer and returns the available pagination action creators.

Parameters

  • engine: CommerceEngine

    The commerce engine.

Returns PaginationActionCreators: The pagination action creators.

PaginationActionCreators

nextPage

Selects the next page.

Parameters

  • payload: SlotIdPayload

    The action creator payload.

Returns PayloadAction<NextPagePayload | undefined>: A dispatchable action.

previousPage

Selects the previous page.

Parameters

  • payload: SlotIdPayload

    The action creator payload.

Returns PayloadAction<PreviousPagePayload | undefined>: A dispatchable action.

registerRecommendationsSlotPagination

Registers pagination for a recommendations slot.

Parameters

  • payload: Required<SlotIdPayload>

    The action creator payload.

Returns PayloadAction<RegisterRecommendationsSlotPaginationPayload>: A dispatchable action.

selectPage

Selects a page.

Parameters

  • payload: SlotIdPayload & { page: number; }

    The action creator payload.

Returns PayloadAction<SelectPagePayload>: A dispatchable action.

setPageSize

Sets the page size.

Parameters

  • payload: SlotIdPayload & { pageSize: number; }

    The action creator payload.

Returns PayloadAction<SetPageSizePayload>: A dispatchable action.