DataView
A collection in your own list and grid templates with a layout switch, pagination, sorting, search, server data, a loading overlay and an empty state.
Basic
Items of a collection rendered by your own list template.
- Oak deskFurniture
€420 - Desk lampLighting
€65 - Office chairFurniture
€280 - Wall shelfStorage
€90 - Wool rugTextiles
€150 - Floor lampLighting
€120 - Linen curtainsTextiles
€75 - BookcaseStorage
€310
Layout
<tx-data-view-layout> in the header switches between the list and the grid template; [(layout)] keeps the choice. The content fades in on every switch.
- Oak deskFurniture
€420 - Desk lampLighting
€65 - Office chairFurniture
€280 - Wall shelfStorage
€90 - Wool rugTextiles
€150 - Floor lampLighting
€120 - Linen curtainsTextiles
€75 - BookcaseStorage
€310
Pagination
paginator pages the items; paginatorPosition puts it at the top, bottom or both. All paginator options work.
- Oak deskFurniture420 €
- Desk lampLighting65 €
- Office chairFurniture280 €
Sort
[(sortField)] and [(sortOrder)] sort the items; put a select into the header to choose.
- Desk lampLighting65 €
- Linen curtainsTextiles75 €
- Wall shelfStorage90 €
- Floor lampLighting120 €
- Wool rugTextiles150 €
- Office chairFurniture280 €
- BookcaseStorage310 €
- Oak deskFurniture420 €
Filter
filterBy names the searched fields and [(filterValue)] holds the text; with no match the empty state shows.
- Oak deskFurniture420 €
- Desk lampLighting65 €
- Office chairFurniture280 €
- Wall shelfStorage90 €
- Wool rugTextiles150 €
- Floor lampLighting120 €
- Linen curtainsTextiles75 €
- BookcaseStorage310 €
Server
lazy hands pages, sort and search to the server through lazyLoad; totalRecords sizes the paginator and loading blurs the items meanwhile.
Empty
emptyMessage or txDataViewEmpty replace the default text when there is nothing to show.
Design tokens
dt changes the tokens of one data view — a tinted header and a roomier footer.
- Desk lampLighting65 €
- Floor lampLighting120 €
Pass through
pt adds classes and styles to the parts of the data view.