Skip to content

ListView API

API reference docs for the Stash ListView component. Learn about the props, CSS, and other APIs of this exported module.

Import

ts
import ListView from '@leaflink/stash/ListView.vue';

Props

NameTypeDefaultDescription
disableLoaderbooleanfalseDo not use the LoadingManager, and instead render the default slot as passed
disablePersistencyboolean-Whether to disable the sticky filters if disabled, the following will happen 1. pre-selected value(s) can be added to the filter component's attributes to overwrite the sticky filters 2. users will not have sticky filters on the page
disableShowFilterboolean-Whether to disable the ability of saving 'show-filters' in local storage
disableStickyHeaderboolean-Whether to disable the stickiness of the header. Default is false. When true, neither the list headers nor the bulk actions (when applicable) will be sticky.
emptyStateTextstring '' Text to render in EmptyState component if there are no results
filterSchemaarray[]
fuzzySearchbooleanfalseMake search fuzzy. Only for client side search.
hideBulkActionOptionsbooleanfalsePrevent bulk actions dropdown from rendering
hideNumberOfTotalSelectedbooleanfalseHide the '{number} of {total} selected' text for bulk actions
hideSelectAllbooleanfalseHide the Select All checkbox for bulk actions
hideTotalboolean-
initialPagenumberundefined
initialSearchTermstring '' If initial search term is provided, the list will be filtered on load.
isItemDisabledfunc() => falseFunction that determines whether the item checkbox is disabled or not (default: false)
isSelectableboolean-Can items on the page be selected for bulk actions
isServerSideboolean-For loading data already paginated, filtered (including search), and sorted from a backend. Defining this prop will disable the built-in search, filtering, sorting and pagination. You will instead need to use the available events (`@change`, and `@change:` prefixed) to know when to request new pages from your backend. This requires providing `totalItemCount`. Use the loading prop to indicate when data is being loaded.
itemTrackBystring 'id' Default field to track selected items by
itemsarray[]The data for each row. Used in this file as this.internalItems (a copy) to allow mutation;
loadingboolean-
pageSizenumber50
searchSchemaobject{}
showFiltersOnLoadboolean-Whether to expand the filters section by default on load.
sortLabelstring '() => t(ll.listView.sortBy)'
sortOnLoadboolean-
sortsobject{}
stickyHeaderOffsetnumbernullOverride the header offset used to position the sticky header
totalItemCountnumberundefinedTotal number of unpaginated results Required when `isServerSide` is `true`
validationSchemafunc() => () => undefinedValidation schema function that returns an object

Slots

NameDescription
actions
secondary-controls
eyebrowRenders custom content in the space below the filters and above the list
list-header
bulk-actions
list-items
default

Events

NameDescription
change
change:filter
change:page
change:search
change:sort
change:reset
filters-toggle-click
select-all
deselect-all
update-filters
updateResults