Requires the
entities bundle. A project without the entities bundle returns 403 database/tables-not-available. See Bundles.Overview
useFetchManyEntitiesWrapper is a stateful wrapper around useFetchManyEntities that manages pagination, sorting, and list state for you. Use it for a self-contained entity feed kept in component state rather than in a shared, listId-keyed useEntityList list — for example, a user profile feed, a filtered search results page, or any custom list with infinite scroll.
All filters and sort options mirror those of useFetchManyEntities. Changing any sort option automatically resets the list and re-fetches from page 1.
Usage Example
Parameters
Number of entities per page: a whole number from
1 to 100. Defaults to 10. A larger value is rejected with 400 entity/invalid-query, never lowered to 100.Only entities from this source, or
"none" for entities with no source. Left out or null: any source.Only entities in this space, or
"none" for entities in no space. Left out or null: any space, or none.Populate related fields, as a single value or an array. Accepted values:
"user", "space", "topComments", "saved", "files", "grants".With
"topComments" included: how many top comments per entity. Server default 1, maximum 5. Not sent when include doesn’t contain "topComments".With
"topComments" included: the reaction whose raw count ranks the top comments. Server default "upvote". Not sent when include doesn’t contain "topComments".Initial reaction type
top ranks by. Only sent while sortBy is "top". Default: "upvote".Initial sort direction. Default:
"desc"; ignored (not sent) for "hot" and "controversial", which rank one way only.Initial sort algorithm. Options:
"auto", "numeric", "text", "boolean", "timestamp". Used when sorting by a metadata field. Default: "auto".Filter by keywords. See Entity List Filters.
Filter by title content. See Entity List Filters.
Filter by body content. See Entity List Filters.
Filter by attachments data. See Entity List Filters.
Filter by geographic proximity. See Entity List Filters.
Filter by metadata fields. See Entity List Filters.
Returns
The last load failure, or
null. Cleared when the next load starts; loadMore() retries it. A SublayError.Change the sort field. Resets the list and re-fetches from page 1.
Change the reaction type for reaction-based sorting. Resets and re-fetches.
Change the sort direction. Resets the list and re-fetches from page 1.
Load the next page of entities and append it, or retry the load that failed. Does nothing while a load is running or when there is nothing more. Never rejects: a failure lands in
error.
