sidePagination
data-side-pagination
String
'server'
。使用 'server'
端需要设置 'url'
或 'ajax'
选项。'sidePagination'
选项设置为 'client'
还是 'server'
。请参见以下示例:'client'
pagination
data-pagination
Boolean
true
可在表格底部显示分页工具栏。false
responseHandler
data-response-handler
Function
function(res) { return res }
Attribute: data-click-to-select
Type: Boolean
Detail:
Set true to select checkbox or radiobox when clicking rows.
Default: false
Example: Click To Select
Attribute: -
Type: Array
Detail:
The table columns config object, see column properties for more details.
Default: []
Example: Table Columns
Attribute: data-content-type
Type: String
Detail:
The contentType of request remote data, for example: application/x-www-form-urlencoded.
Default: ‘application/json’
Example: Content Type
Attribute: data-data-field
Type: String
Detail:
Key in incoming json containing ‘rows’ data list.
Default: ‘rows’
Example: Total/Data Field
Attribute: data-data-type
Type: String
Detail:
The type of data that you are expecting back from the server.
Default: ‘json’
Example: Data Type
Attribute: data-detail-view
Type: Boolean
Detail:
Set true to show detail view table.
Default: false
Example: Detail View
Attribute: data-detail-formatter
Type: Function
Detail:
Format your detail view when detailView is set to true. Return a String and it will be appended into the detail view cell, optionally render the element directly using the third parameter which is a jQuery element of the target cell.
Default: function(index, row, element) { return ‘’ }
Example: Detail View
Attribute: data-escape
Type: Boolean
Detail:
Escapes a string for insertion into HTML, replacing &, <, >, “, `, and ‘ characters.
Default: false
Example: Table Escape
Attribute: data-footer-field
Type: String
Detail:
Defines the key of the footer Object (From data array or server response json). The footer Object can be used to set/define footer colspans and/or the value of the footer.
Copy
{
“rows”: [
{
“id”: 0,
“name”: “Item 0”,
“price”: “$0”,
“amount”: 3
}
],
“footer”: {
“id”: “footer id”,
“_id_colspan”: 2,
“name”: “footer name”
}
}
Default: footerField
Example: Footer Field
Attribute: data-footer-style
Type: Function
Detail:
The footer style formatter function, takes one parameter:
column: the column object.
Support classes or css. Example usage:
function footerStyle(column) {
return {
css: { 'font-weight': 'normal' },
classes: 'my-class'
}
}
Default: {}
Example: Footer Style
Attribute: data-header-style
Type: Function
Detail:
The header style formatter function, takes one parameter:
column: the column object.
Support classes or css. Example usage:
function headerStyle(column) {
return {
css: { 'font-weight': 'normal' },
classes: 'my-class'
}
}
Default: {}
Example: Header Style
Attribute: data-height
Type: Number
Detail:
The height of table, enable fixed header of table.
Default: undefined
Example: Table Height
Attribute: data-id-field
Type: String
Detail:
Indicate which field will be used as checkbox/radiobox value, its the counterpart to selectItemName.
Default: undefined
Example: Id Field
Attribute: data-select-item-name
Type: String
Detail:
The name of radio or checkbox input.
Default: ‘btSelectItem’
Example: Id Field
Attribute: data-ignore-click-to-select-on
Type: Function
Detail:
Set the ignore elements clickToSelect on. Takes one parameter:
element: the element clicked on.
Return true if the click should be ignored, false if the click should cause the row to be selected. This option is only relevant if clickToSelect is true.
Default: { return [‘A’, ‘BUTTON’].includes(tagName) }
Example: Ignore Click To Select On
Attribute: data-loading-font-size
Type: String
Detail:
To define the font size of the loading text, the default value is ‘auto’, it will be calculated automatically according to the table width, between 12px and 32px.
Default: ‘auto’
Example: Loading Font Size
Attribute: data-locale
Type: String
Detail:
Sets the locale to use (i.e. ‘zh-CN’). Locale files must be pre-loaded. Allows for fallback locales, if loaded, in the following order:
First tries for the locale as specified,
Then tries the locale with ‘_’ translated to ‘-‘ and the region code upper cased,
Then tries the short locale code (i.e. ‘zh’ instead of ‘zh-CN’),
And finally will use the last locale file loaded (or the default locale if no locales loaded).
If left undefined or an empty string, use the last locale loaded (or ‘en-US’ if no locale files loaded).
Default: undefined
Example: Table Locale
Attribute: data-method
Type: String
Detail:
The method type to request remote data.
Default: ‘get’
Example: Table Method
Attribute: data-minimum-count-columns
Type: Number
Detail:
The minimum number of columns to hide from the columns drop down list.
Default: 1
Example: Minimum Count Columns
multipleSelectRow
Attribute: data-multiple-select-row
Type: Boolean
Detail:
Set true to enable the multiple selection row. Can use the ctrl+click to select one row or use shift+click to select a range of rows.
Default: false
Example: Multiple Select Row
pageList
Attribute: data-page-list
Type: Array
Detail:
When set pagination property, initialize the page size selecting list. If you include the ‘all’ or ‘unlimited’ option, all the records will be shown in your table.
Hint: If the table has lesser rows as the option(s), the options will be hidden automatically, to disable that feature you can set smartDisplay to false
Default: [10, 25, 50, 100]
Example: Page List
Attribute: data-page-number
Type: Number
Detail:
When set pagination property, initialize the page number.
Default: 1
Example: Page Number
Attribute: data-page-size
Type: Number
Detail:
When set pagination property, initialize the page size.
Default: 10
Example: Page Size
Attribute: data-pagination-loop
Type: Boolean
Detail:
Set true to enable pagination continuous loop mode.
Default: true
Example: Pagination Loop
Attribute: data-pagination-v-align
Type: String
Detail:
Indicate how to vertical align the pagination. ‘top’, ‘bottom’, ‘both’ (put the pagination on top and bottom) can be used.
Default: ‘bottom’
Example: Pagination V Align
Attribute: data-query-params
Type: Function
Detail:
When requesting remote data, you can send additional parameters by modifying queryParams.
If queryParamsType = ‘limit’, the params object contains: limit, offset, search, sort, order.
Else, it contains: pageSize, pageNumber, searchText, sortName, sortOrder.
Return false to stop request.
Default: function(params) { return params }
Example: Query Params
Attribute: data-query-params-type
Type: String
Detail:
Set ‘limit’ to send query params with RESTFul type.
Default: ‘limit’
Example: Query Params Type
Attribute: data-remember-order
Type: Boolean
Detail:
Set true to remember the order for each column.
Default: false
Example: Remember Order
Attribute: data-row-attributes
Type: Function
Detail:
The row attribute formatter function, takes two parameters:
row: the row record data.
index: the row index.
Support all custom attributes.
Default: {}
Example: Row Attributes
Attribute: data-row-style
Type: Function
Detail:
The row style formatter function, takes two parameters:
row: the row record data.
index: the row index.
Support classes or css.
Default: {}
Example: Row Style
Attribute: data-search-accent-neutralise
Type: Boolean
Detail:
Set to true if you want to use accent neutralise feature.
Default: false
Example: Search Accent Neutralise
Attribute: data-show-columns
Type: Boolean
Detail:
Set true to show the columns drop down list. We can set the switchable column option to false to hide the columns item in the drop down list.
Default: false
Example: Basic Columns and Large Columns
Attribute: data-show-columns-search
Type: Boolean
Detail:
Set true to show a search for the columns filter.
Default: false
Example: Columns Search
Attribute: data-show-columns-search
Type: Boolean
Detail:
Set true to show a search for the columns filter.
Default: false
Example: Columns Search
Attribute: data-show-fullscreen
Type: Boolean
Detail:
Set true to show the fullscreen button.
Default: false
Example: Show Fullscreen
Attribute: data-show-pagination-switch
Type: Boolean
Detail:
Set true to show the pagination switch button.
Default: false
Example: Show Pagination Switch
Attribute: data-show-refresh
Type: Boolean
Detail:
Set true to show the refresh button.
Default: false
Example: Show Refresh
Attribute: data-show-toggle
Type: Boolean
Detail:
Set true to show the toggle button to toggle table / card view.
Default: false
Example: Show Toggle
Attribute: data-single-select
Type: Boolean
Detail:
Set true to allow checkbox selecting only one row.
Default: false
Example: Single Select
Attribute: data-toolbar
Type: String/Node
Detail:
A jQuery selector that indicates the toolbar, for example: #toolbar, .toolbar, or a DOM node.
Default: undefined
Example: Custom Toolbar