Options API

Options

Options are set in three layers, where the more particular overrides the more general.
  1. 1.
    Pre-defined component defaults.
  2. 2.
    Applicable user-defined defaults for the global Vue Instance. Passed as the second paramter to the Use statement.
  3. 3.
    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
false
alwaysShowPerPageSelect
Boolean
Show per page select even when there is only one value in the list
false
caption
String
table caption element
false
childRow
Function
See Child Rows
false
childRowTogglerFirst
Boolean
Should the child row be positioned at the first column or the last one
true
clientMultiSorting
Boolean
Enable multiple columns sorting using Shift + Click on the client component
true
disabledChildRows
Function
See Child Rows
toggleGroups (client-side)
Boolean
When using the groupBy option, settings this to true will make group's visibility togglable, by turning the group name into a button
false
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
false
customFilters
Array
[]
customSorting (client-side)
Object
{}
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
DD/MM/YYYY
dateFormatPerColumn
Object
override the default date format for specific columns
{}
datepickerOptions
Object
Options for the daterangepicker when using a date filter (see dateColumns)
{ locale: { cancelLabel: 'Clear' } }
datepickerPerColumnOptions
Object
additional options for specific columns, to be merged with datepickerOptions. Expects an object where the key is a column name, and the value is an options object
{}
Last modified 8mo ago
Copy link