Options API
Options
Options are set in three layers, where the more particular overrides the more general.
Pre-defined component defaults.
Applicable user-defined defaults for the global Vue Instance. Passed as the second paramter to the
Use
statement.Options for a single table, passed through the
options
prop.
Option | Type | Description | Default |
addSortedClassToCells | Boolean | Add class indicating column and sort direction to sorted column cells |
|
alwaysShowPerPageSelect | Boolean | Show per page select even when there is only one value in the list |
|
caption | String | table |
|
childRow | Function | See Child Rows |
|
childRowTogglerFirst | Boolean | Should the child row be positioned at the first column or the last one |
|
clientMultiSorting | Boolean | Enable multiple columns sorting using Shift + Click on the client component |
|
disabledChildRows | Function | See Child Rows | |
toggleGroups (client-side) | Boolean | When using the |
|
cellClasses | Object |
| |
columnsClasses | Object | Add class(es) to the specified columns. Takes key-value pairs, where the key is the column name and the value is a string of space-separated classes |
|
columnsDisplay | Object |
| |
columnsDropdown | Boolean |
| |
customFilters | Array | See Custom Filters |
|
customSorting (client-side) | Object | See Custom Sorting |
|
dateColumns | Array | Use daterangepicker as a filter for the specified columns (when filterByColumn is set to true). Dates should be passed as moment objects, or as strings in conjunction with the toMomentFormat option |
|
dateFormat | String | Format to display date objects (client component). Using momentjs. This will also affect the datepicker on both components |
|
dateFormatPerColumn | Object | override the default date format for specific columns |
|
datepickerOptions | Object | Options for the daterangepicker when using a date filter (see dateColumns) |
|
datepickerPerColumnOptions | Object | additional options for specific columns, to be merged with |
|
debounce | Number | Number of idle milliseconds (no key stroke) to wait before sending a request. Used to detect when the user finished his query in order to avoid redundant requests (server) or rendering (client) |
|
descOrderColumns | Array | By default the initial sort direction is ascending. To override this for specific columns pass them into this option |
|
destroyEventBus | Boolean | Should the plugin destroy the event bus before the table component is destroyed? Since the bus is shared by all instances, only set this to |
|
editableColumns | Array | Columns that should be editable. See Editable Cells |
|
filterable | Array / Boolean | Filterable columns | Set to |
filterAlgorithm | Object | Define custom filtering logic per column. See Filtering Algorithm |
|
footerHeadings | Boolean | Display headings at the bottom of the table too |
|
headings | Object | Table headings. | Can be either a string or a function, if you wish to inject vue-compiled HTML.
E.g: |
hiddenColumns | Array / Boolean | An array of columns to hide initially (can then be added by user using |
|
groupBy (client-side) | String | Group rows by a common property. E.g, for a list of countries, group by the |
|
groupMeta (client-side) | Array | Meta data associated with each group value. To be used in conjunction with |
|
headingsTooltips | Object | Table headings tooltips. | Can be either a string or a function, if you wish to inject vue-compiled HTML. Renders as |
highlightMatches | Boolean | Highlight matches |
|
initFilters | Object | Set initial values for all filter types: generic, by column or custom. Accepts an object of key-value pairs, where the key is one of the following: a. "GENERIC" - for the generic filter b. column name - for by column filters. c. filter name - for custom filters. In case of date filters the date range should be passed as an object comprised of start and end properties, each being a moment object. |
|
initialPage | Number | Set the initial page to be displayed when the table loads | 1 |
listColumns | Object | See List Filters | {} |
multiSorting (client-side) | Object | See Mutiple Sorting | {} |
orderBy.ascending | Boolean | initial order direction |
|
orderBy.column | String | initial column to sort by | Original dataset order |
pagination.chunk | Number | maximum pages in a chunk of pagination |
|
pagination.dropdown | Boolean | use a dropdown select pagination next to the records-per-page list, instead of links at the bottom of the table. |
|
pagination.nav | String | Which method to use when navigating outside of chunk boundries. Options are : |
|
pagination.edge | Boolean | Show 'First' and 'Last' buttons |
|
pagination.show | Boolean | Should pagination be displayed? |
|
pagination.virtual (premium) | Boolean | Enable virtual (infinite/continuous) pagination |
|
params (server-side) | Object | Additional parameters to send along with the request |
|
perPage | number | Initial records per page |
|
perPageValues | Array | Records per page options |
|
preserveState | Boolean | Preserve dynamically created vuex module when the table is destroyed |
|
requestAdapter (server-side) | Function | Set a custom request format |
|
requestFunction (server-side) | Function | Set a custom request function | See documentation |
requestKeys (server-side) | Object | Set your own request keys |
|
resizableColumns | Boolean / Array | 3 options: a. |
|
responseAdapter (server-side) | Function | Transform the server response to match the format expected by the client. This is especially useful when calling a foreign API, where you cannot control the response on the server-side |
|
rowAttributesCallback | Function | Add dynamic attributes to table rows. E.g function(row) { return {id: row.id}} This can be useful for manipulating the attributes of rows based on the data they contain |
|
rowClassCallback | Function | Add dynamic classes to table rows. E.g function(row) { return This can be useful for manipulating the appearance of rows based on the data they contain |
|
saveState | Boolean | Constantly save table state and reload it each time the component mounts. When setting it to true, use the |
|
sendEmptyFilters (server-side) | Boolean | When filtering by column send all request keys, including empty ones |
|
sendInitialRequest (server-side) | Boolean | Should a request to fetch the data be sent immediately when the table renders |
|
selectable.mode (premium) | String | Enables selectable rows | |
selectable.only (premium) | Function | Decides which rows should be selectable | |
selectable.selectAllMode (premium) | String | Decides whether to select all filtered rows, or only the current page |
|
serverMultiSorting | Boolean | Enable multiple columns sorting using Shift + Click on the server component |
|
showChildRowToggler | Boolean | Enable render of |
|
skin | String | Space separated table styling classes |
|
sortIcon | String | Sort icon classes |
|
sortable | Array | Sortable columns | All columns |
sortingAlgorithm | Function | define your own sorting algorithm |
|
summary | String | Table's |
|
stickyHeader (premium) | Boolean | Make the table head sticky |
|
stickyHeaderBackground (premium) | String |
| white |
storage | String | Which persistance mechanism should be used when saveState is set to true: |
|
tabbable | Boolean | Allow table navigation using the tab key |
|
templates | Object | See Templates | {} |
texts | Object | see the | |
toMomentFormat (client-side) | String | transform date columns string values to momentjs objects using this format. If this option is not used the consumer is expected to pass momentjs objects himself |
|
uniqueKey | String | The key of a unique identifier in your dataset, used to track the child rows, and return the original row in row click event |
|
visibleColumns | Array / Boolean | An array of columns to show initially (can then be altered by user using |
|
Last updated