-
Notifications
You must be signed in to change notification settings - Fork 30
New features 12.12.2013
The original use of my implementation was to send requests to the server to get the new data table page content. Nowadays we use the data table more often to handle one big collection on client side. I built the option to switch between this two mode.
- paginationType 'explicit' is the way to send requests to the server
- paginationType 'implicit' (this is from now the default mode) is the way to handle a big collection (like the original way of the jQuery DataTable).
Html
* pagination-type="explicit" --> work with the server
or
* pagination-type="explicit" or nothing --> work with a client side collection
Controller
In the example app you will find two sections in the main controller to modify if you want to try out the implicit way of pagination. Search for 'IMPLICIT PAGINATION' in the code.
From now you have the option to define custom column titles. You need a collection in the controller to map the title texts (title) to the property names (propertyName).
Controller
var customTitles = [
{propertyName : 'engine', title : '1. engine'},
{propertyName : 'browser', title : '2. browser'},
{propertyName : 'platform', title : '3. platform'},
{propertyName : 'version', title : '4. version'},
{propertyName : 'grade', title : '5. grade'}
];
Html
header-titles="customTitles"
You can from now define the default page size for the data table. It is originally 10. 'PageSizes' works with this option as well. But you can set the default page size without the option to change the pagesize with a header control (PageSizes).
Html
default-page-size="10"