<VueList> component is the foundation of the VueList system. It manages all list state (pagination, search, filters, sorting) and handles API requests through your configured requestHandler.
Basic usage
Props
The API endpoint identifier. This value is passed to your
requestHandler to determine which API to call.Additional data to pass to your
requestHandler. Useful for passing extra parameters like tenant IDs, API versions, or custom headers.Reactive filter object. When filters change, the list automatically resets to page 1 and refetches data. Use
v-model:filters for two-way binding.Initial page number. This is only the starting value — the component manages its own internal
localPage state.Number of items to fetch per page. This is the initial value — the component manages its own internal
localPerPage state.Initial column to sort by. The component manages its own internal
localSortBy state.Initial sort direction:
asc or desc. The component manages its own internal localSortOrder state.Initial search query. The component manages its own internal
localSearch state.List of attributes/columns to display. Used with
<VueListAttributes> for column visibility toggling.Custom request handler for this specific list. Overrides the global
requestHandler configured during plugin setup.Version identifier for state management. Increment this when you make breaking changes to your list configuration. The state manager uses this to invalidate stale cached states.
Whether to sync the current page number to the URL query string. When enabled, the page number appears as
?page=2 in the URL.Pagination mode:
pagination (page numbers) or loadMore (infinite scroll button).Events
Emitted when the selection changes. Receives the new and old selection arrays.
Emitted after every successful API response. Receives the full response object.
Emitted after page changes (only in
pagination mode).Emitted after loading more items (only in
loadMore mode).Slot props
The default slot receives a scope object with the current list state:Available scope properties
items- Array of data itemscount- Total count from APIresponse- Full API response objectisLoading- True during data fetchisInitialLoading- True only during first loadselection- Array of selected itemserror- Error object if request failedserializedAttrs- Processed attributes arrayisEmpty- True if no items existcontext- Full context object passed to requestHandlerrefresh()- Method to refresh data
Exposed methods
Access these methods via template refs:Methods
setPage(pageNumber)- Navigate to a specific pagesetPerPage(count)- Change items per pagesetSort({ by, order })- Update sortingsetSearch(query)- Update search querysetSelection(items)- Update selected itemsrefresh()- Refresh current dataloadMore()- Load next page (loadMore mode only)
Exposed state
items- Ref to current items arrayresponse- Ref to last API responseisLoading- Ref to loading stateerror- Ref to error objectcount- Ref to total countselection- Ref to selected items
Complete example
Next steps
VueListItems
Learn how to render list items
Request handler
Configure how API requests are made