The table component (lk-table)…
The current implementation of this component is designed to be as flexible as possible when it comes to filtering, selecting and sorting, only providing a minimal UI and delegating such functionality to the parent component. This is done to allow for server side searching, filtering and sorting.
There are times when we want the table to be flush to the edges of it's container. The flush prop can be used to achieve this.
The table component provides an interface for sorting items, but actual sorting is handled by the table's parent component using a computed value, as demonstrated in the example below.
The table component provides an interface for selecting individual items (and bulk selection), but actual selection is handled by the table's parent component, as demonstrated in the example below.
The table component does not directly provide any filtering interface, functionality or utility.
Filtering is achieved by applying the filter on the items before passing them to the table component. The best way to do this is using a computed value and the Array.prototype.filter() function, as demonstrated below.
The table component provides an interface for switching pages, but actual pagination is handled by the table's parent component.
Pagination is achieved by using [LIST UTILITY FUNCTIONS], as demonstrated in the example below.