Skip to main content

Overview

useFetchManyEventsWrapper wraps useFetchManyEvents into a ready-to-render list: it holds the accumulated events, tracks loading/hasMore, manages sort state, and exposes loadMore and refresh. It mirrors useFetchManyEntitiesWrapper. Visibility is enforced server-side, so the list only contains events the current user may see. Changing any filter prop (or calling refresh) resets the list to page 1.

Usage Example

Parameters

number
Page size. Defaults to 10.
string | null
Restrict to one space.
string | null
Only events this user hosts.
"online" | "physical" | "hybrid" | null
Filter by type.
"active" | "cancelled" | null
Filter by status.
"upcoming" | "ongoing" | "past" | null
Derived time window.
string | null
ISO datetime lower bound.
string | null
ISO datetime upper bound.
RsvpStatus | RsvpStatus[] | null
Statuses the logged-in user RSVP’d with.
object | null
Proximity filter.
object | null
Free-text filter on title.
object | null
Free-text filter on description.
string | string[]
Associations to expand.
"startTime" | "going"
Initial sort field. Defaults to "startTime".
"asc" | "desc"
Initial sort direction. Defaults to "asc".

Returns

Event[]
The accumulated events.
boolean
true while fetching.
boolean
Whether more pages remain.
"startTime" | "going"
Current sort field.
"asc" | "desc"
Current sort direction.
(s) => void
Change the sort field (resets to page 1).
(d) => void
Change the sort direction (resets to page 1).
() => void
Advance to the next page.
() => void
Re-run the query from page 1.

See Also