Skip to content

<VueList> - The Root Component ​

The root component that wires everything together. It manages the entire data lifecycle β€” state, filters, pagination, search, and API calls β€” and provides context for all child components.

It’s the only component you must include. Every other component depends on the context provided by <VueList>.

vue
<template>
  <VueList>
    <template #default="{...}">
      <!-- Child Components-->
    </template>
  </VueList>
</template>

Props ​

PropDefaultType
endpointString - required
The unique identifier for the data source. Passed to the requestHandler. It can be a URL or part of URL.
page1Number
Initial page value.
perPage25Number
Initial number of items per page.
sortByString
Initial sorting field.
sortOrderdescString
Initial sorting direction. Should be either asc or desc.
searchString
Initial search term.
requestHandlerOverride the global requestHandler defined during plugin setup β€” ideal for module-specific logic.
versionString Number
Optional identifier for stateManager. You can use this with endpoint to generate new unique keys for state and delete old stale keys.
hasPaginationHistorytrueBoolean
VueList will append the current page number to the URL query params β€” improving back button support.
paginationModepaginationString
pagination: Shows page numbers and traditional navigation.
loadMore: Loads more items on scroll or button click.

Events ​

NameArgumentsDescription
onItemSelectWIP
onResponseWIP
afterPageChangeWIP
afterLoadMoreWIP

Slots ​

default ​

The only slot available in <VueList> is default. It exposes a set of scoped variables that let you access and render the list state however you like.

Slot Props ​

KeyDescription
itemsArray
Array of items returned from the API
responseObject
Full response object from the requestHandler
isLoadingBoolean
Indicating whether the list is currently loading
selectionArray
Object containing selected item(s) if selection is enabled
errorError object if the request failed
isEmptyBoolean
Indicating if the items array is empty
contextObject
The full context object same as passed to the requestHandler and stateManager
refreshFunction
Function to manually trigger a refetch

Version 2.1.1