Home > @shopware-pwa/composables > IUseListing

# IUseListing interface

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Listing interface, can be used to display category products, search products or any other Shopware search interface (ex. orders with pagination)


export interface IUseListing<ELEMENTS_TYPE> 

# Properties

Property Type Description
changeCurrentPage (pageNumber?: number | string) => Promise<void> (BETA)
changeCurrentSortingOrder (order: string | string[]) => Promise<void> (BETA)
getAvailableFilters ComputedRef<ListingFilter[]> (BETA)
getCurrentFilters ComputedRef<any> (BETA)
getCurrentListing ComputedRef<Partial<ListingResult<ELEMENTS_TYPE>> | null> (BETA)
getCurrentPage ComputedRef<string | number> (BETA)
getCurrentSortingOrder ComputedRef<string | undefined> (BETA)
getElements ComputedRef<ELEMENTS_TYPE[]> (BETA)
getInitialListing ComputedRef<ListingResult<ELEMENTS_TYPE> | null> (BETA)
getLimit ComputedRef<number> (BETA)
getSortingOrders ComputedRef<Sort[] | { key: string; label: string; }> (BETA)
getTotal ComputedRef<number> (BETA)
getTotalPagesCount ComputedRef<number> (BETA)
initSearch (criteria: Partial<ShopwareSearchParams>) => Promise<void> (BETA)
loading ComputedRef<boolean> (BETA)
loadingMore ComputedRef<boolean> (BETA)
loadMore () => Promise<void> (BETA)
search (criteria: Partial<ShopwareSearchParams>, options?: { preventRouteChange?: boolean; }) => Promise<void> (BETA)
setInitialListing (initialListing: Partial<ListingResult<ELEMENTS_TYPE>>) => void (BETA)