Properties
All property default values are globally configurable.
Property (Click to sort ascending) | Type (Click to sort ascending) | Default | Description |
---|---|---|---|
api-url | String | Pass through prop. Passed as part of the context object sent to the items provider function | |
bordered | Boolean | false | Adds borders to all the cells and headers |
borderless | Boolean | false | Removes all borders from cells |
busy | Boolean | false | When set, forces the table into the busy state.Automatically set when an items provider function is being called |
caption | String | Text string to place in the caption element | |
caption-html Use with caution | String | HTML string to place in the caption element | |
caption-top | Boolean | false | Visually place the table caption above the table. Default is below |
current-page | Number or String | 1 | The current page number to display when the table is paginated. Starting from 1 and up |
dark | Boolean | false | Places the table in dark mode |
details-td-class v2.1.0+ | Array or Object or String | CSS class (or classes) to apply to the row details' `td` element for the row-details slot | |
empty-filtered-html Use with caution | String | HTML string to show when the table has no items to show due to filtering | |
empty-filtered-text | String | 'There are no records matching your request' | Text string to show when the table has no items to show due to filtering |
empty-html Use with caution | String | HTML string to show when the table has no items to show | |
empty-text | String | 'There are no records to show' | Text string to show when the table has no items to show |
fields | Array | null | Array of field names or array of field definition objects |
filter | Array or Object or String or RegExp | Criteria for filtering. Internal filtering supports only string or RegExpr criteria | |
filter-debounce v2.0.0+ | Number or String | 0 | Time in milliseconds to debounce changes to the filter criteria before filtering the records |
filter-function | Function | Reference to a function to use instead of the internal filtering function. Refer to the docs for details | |
filter-ignored-fields | Array | [] | Array of top level fields to ignore when filtering the item data |
filter-included-fields | Array | [] | Array of fields to include when filtering. Overrides filter-ignore-fields |
fixed | Boolean | false | Makes all columns equal width (fixed layout table). Will speed up rendering for large tables. Column widths can be set via CSS or colgroup |
foot-clone | Boolean | false | Enable the footer of the table, and clone the header content by default |
foot-row-variant v2.1.0+ | String | Apply a Bootstrap theme color variant to the tr element in the tfoot. Falls back to head-row-variant | |
foot-variant | String | Footer variant: 'light' or 'dark', or unset. May take precedence over foot-row-variant | |
head-row-variant v2.1.0+ | String | Apply a Bootstrap theme color variant to the tr element in the thead | |
head-variant | String | Header variant: 'light' or 'dark', or unset. May take precedence over head-row-variant | |
hover | Boolean | false | Enables hover styling on rows |
id | String | Used to set the `id` attribute on the rendered content, and used as the base to generate any additional element IDs as needed | |
items | Array or Function | [] | Array of items to display, or an items provider function reference. Refer to the docs for details |
label-sort-asc | String | 'Click to sort ascending' | Hidden string to place in the header cell when clicking the cell will change the sort direction to ascending |
label-sort-clear | String | 'Click to clear sorting' | Hidden string to place in the header cell when clicking the cell will clear the current sorting direction |
label-sort-desc | String | 'Click to sort descending' | Hidden string to place in the header cell when clicking the cell will change the sort direction to descending |
no-border-collapse v2.0.0+ | Boolean | false | Disable's the collapsing of table borders. Useful when table has sticky headers or columns |
no-footer-sorting | Boolean | false | When the build in formatter is used, setting this prop will disable the sorting ability in the footer |
no-local-sorting | Boolean | false | Disabled the internal sorting routine, and expects the user to provde the items sorted. Sorting controls will still be available |
no-provider-filtering | Boolean | false | When set, uses internal filtering to pagination the data. Otherwise the provider is expected to perform the filtering |
no-provider-paging | Boolean | false | When set, uses internal paging to pagination the data. Otherwise the items provider is expected to perform the paging |
no-provider-sorting | Boolean | false | When set, uses internal sorting to sort the data. Otherwise the items provider is expected to perform the sorting |
no-select-on-click v2.1.0+ | Boolean | false | Disables row selection via click events. Row selection will be only available programmatically |
no-sort-reset | Boolean | false | When a table is sortable, clicking on any non-sortable column heading will clear the current sort values. Set this prop to disable this feature |
outlined | Boolean | false | Adds an outline border to the table element |
per-page | Number or String | 0 | Number of rows to show per page. Set to 0 to disable pagination |
primary-key | String | Name of a table field that contains a guaranteed unique value per row. Needed for tbody transition support, and also speeds up table rendering | |
responsive | Boolean or String | false | Makes the table responsive in width, adding a horizontal scrollbar. Set to true for always responsive or set to one of the breakpoints to switch from responsive to normal: 'sm', 'md', 'lg', 'xl' |
select-mode | String | 'multi' | The selectable mode for the table when 'selectable' is set. Possible values: 'single', 'multi' or 'range' |
selectable | Boolean | false | When set, places the table body rows in selectable mode |
selected-variant | String | 'active' | Bootstrap color theme variant to set selected rows to. Use any of the standard Bootstrap theme color variants, or the special table row variant 'active' (default). Set to an empty string to not use a variant |
show-empty | Boolean | false | When enabled, and there are no item records to show, shows a message that there are no rows to show |
small | Boolean | false | Renders the table with smaller cell padding |
sort-by | String | Field name that is currently being sorted. Set to null to clear sorting. Syncable with the .sync prop modifier | |
sort-compare | Function | A reference to a function for sort-comparing two rows of data. Defaults to the internal sort compare routine. See docs for details | |
sort-compare-locale | Array or String | The locale string (or array of locale string) that specified the language when sorting. See docs for details | |
sort-compare-options | Object | {
'numeric': true
} | An object containing sort configuration for the 'String.prototype.sortLocale' method. See docs for details |
sort-desc | Boolean | false | Set to true to sort the column in descending order. Syncable with the .sync prop modifier |
sort-direction | String | 'asc' | The initial sorting direction to sort an unsorted column by: 'asc', 'desc', or 'last' (to use the previous sort direction) |
sort-icon-left | Boolean | false | Positions the sort control to the left of the header text. Default is on the right of the header text |
sort-null-last | Boolean | false | When sorting, null and undefined values will be sorted first (or last, depending on 'sort-desc'). Set this prop to sort null values last. Only applicable to internal sorting |
stacked | Boolean or String | false | Place the table in stacked mode. Set to true for always stacked, or set to one of the breakpoints to switch from stacked to normal: 'sm', 'md', 'lg', 'xl' |
sticky-header | Boolean or String | false | Makes the table header sticky. Set to true for a maximum height 300px tall table, or set to any valid CSS hight (including units) |
striped | Boolean | false | Applies striping to the tbody rows |
table-class | Array or Object or String | CSS class (or classes) to apply to the table element | |
table-variant | String | Apply a Bootstrap theme color variant to the entire table | |
tbody-class | Array or Object or String | CSS class (or classes) to apply to the tbody element | |
tbody-tr-attr v2.2.0+ | Object or Function | Attributes to be added to each tr in the tbody, or a function returning such attributes (see docs for details) | |
tbody-tr-class | Array or Object or String or Function | CSS class (or classes) to apply to the tr element in the tbody. Can be a function that returns a class (see docs for details) | |
tbody-transition-handlers | Object | Vue 'transition-group' event handlers. When provided will make the tbody a Vue 'transition-group' component | |
tbody-transition-props | Object | Vue 'transition-group' properties. When provided will make the tbody a Vue 'transition-group' component | |
tfoot-class | Array or Object or String | CSS class (or classes) to apply to the tfoot element | |
tfoot-tr-class | Array or Object or String | CSS class (or classes) to apply to the tr element in the tfoot | |
thead-class | Array or Object or String | CSS class (or classes) to apply to the thead element | |
thead-tr-class | Array or Object or String | CSS class (or classes) to apply to the tr element in the thead | |
value v-model | Array | [] | Currently displayed row data. Read-only. Do not set a value on this prop |
Caution: Props that support HTML strings
(*-html
) can be vulnerable to
Cross Site Scripting (XSS) attacks
when passed raw user supplied values. You must properly
sanitize
the user input first!