Bamboo Watch 1Accessories
$20In stock
Sorting and paging over your own template per item, shown as a list or a grid.
import { DataView } from '@vitral/vue';Read from packages/vue/src/components/DataView/types.ts, so it says what the component actually accepts.
| Name | Type | Description |
|---|---|---|
| value | any[] | The items; with `lazy`, only the current page. |
| layout | 'list' | 'grid' | Which template renders the items: `list` (the default) or `grid`. |
| dataKey | string | A field that identifies an item. |
| sortField | string | Sort by this field… |
| sortOrder | 1 | -1 | 0 | …ascending (1) or descending (-1). |
| paginator | boolean | — |
| rows | number | Items per page. Defaults to 12. |
| rowsPerPageOptions | number[] | — |
| pageLinkSize | number | — |
| paginatorPosition | 'top' | 'bottom' | 'both' | — |
| alwaysShowPaginator | boolean | — |
| lazy | boolean | Nothing is computed here: page changes are emitted (`page`) for the app to answer. |
| totalRecords | number | The total across pages when `lazy`. |
| loading | boolean | — |
| emptyMessage | string | — |
Plus pt, dt and unstyled from BaseProps, see pass-through and unstyled mode.
| Event | Payload | Description |
|---|---|---|
| page | event: { page: number; first: number; rows: number; pageCount: number } | — |
| Name | Slot props | Description |
|---|---|---|
| header | — | — |
| footer | — | — |
| list | (props: { items: unknown[]; first: number }) | The items of the page, in the list layout. |
| grid | (props: { items: unknown[]; first: number }) | The items of the page, in the grid layout. The slot's elements are the grid's cells. |
| empty | — | — |
| loadingicon | — | — |