VDataTable API
name | type | default |
|---|---|---|
| Record<string, any> | (( data: Pick< ItemKeySlot<any>, 'value' | 'item' | 'column' | 'index' | 'internalItem' >, ) => Record<string, any>) | undefined | |
An object of additional props to be passed to each | ||
| string | (string | [string, number])[] | (new () => any) | FunctionalComponent | '$collapse' | |
Icon to display when the expandable row is expanded. | ||
string
| undefined | |
Applies a color to checkboxes, page size dropdown and sort badges in the table header. | ||
FilterFunction | undefined | |
Function to filter items. | ||
unknown
| undefined | |
Function used on specific keys within the item object. | ||
unknown
| undefined | |
Function used on specific keys within the item object. | ||
'default' | 'comfortable' | 'compact' | 'default' | |
Adjusts the vertical height of the table rows. | ||
boolean
| false | |
Toggles rendering of sort button. | ||
string[] | [] | |
Array of expanded items. Can be bound to external variable using v-model:expanded. | ||
| string | (string | [string, number])[] | (new () => any) | FunctionalComponent | '$expand' | |
Icon to display when the expandable row is collapsed. | ||
boolean
| false | |
Expands item when the row is clicked. | ||
string | string[] | undefined | |
Array of specific keys to filter on the item. | ||
'every' | 'some' | 'union' | 'intersection' | 'intersection' | |
Controls how the results of
| ||
| string | (string | [string, number])[] | (new () => any) | FunctionalComponent | '$first' | |
First icon. | ||
string
| '$vuetify.dataFooter.firstPage' | |
Label for first page. | ||
boolean
| false | |
Use the fixed-footer prop together with the height prop to fix the footer to the bottom of the table. | ||
boolean
| false | |
Fixed header to top of table. | ||
SortItem[] | [] | |
Configures attributes (and sort order) to group items together. Can be customized further with | ||
| string | (string | [string, number])[] | (new () => any) | FunctionalComponent | '$tableGroupCollapse' | |
Icon to display when the row group is expanded. | ||
| string | (string | [string, number])[] | (new () => any) | FunctionalComponent | '$tableGroupExpand' | |
Icon to display when the row group is collapsed. | ||
unknown
| undefined | |
Pass props to the default header. See | ||
{ readonly key?: | (string & {}) | 'data-table-group' | 'data-table-select' | 'data-table-expand' | undefined readonly value?: SelectItemKey<any> readonly title?: string | undefined readonly fixed?: boolean | 'end' | 'start' | undefined readonly align?: 'end' | 'start' | 'center' | undefined readonly width?: string | number | undefined readonly minWidth?: string | number | undefined readonly maxWidth?: string | number | undefined readonly nowrap?: boolean | undefined readonly indent?: number | undefined readonly headerProps?: { readonly [x: string]: any } | undefined readonly cellProps?: | { readonly [x: string]: any } | HeaderCellPropsFunction | undefined readonly sortable?: boolean | undefined readonly sort?: DataTableCompareFunction<any> | undefined readonly sortRaw?: DataTableCompareFunction<any> | undefined readonly filter?: FilterFunction | undefined readonly children?: readonly any[] | undefined }[] | undefined | |
An array of objects that each describe a header column. | ||
string | number | undefined | |
Set an explicit height of table. | ||
boolean
| false | |
Hides the default body. | ||
boolean
| false | |
Hides the default footer. | ||
boolean
| false | |
Hides the default header. | ||
boolean
| false | |
Hides the menu when there are no options to show. Useful for preventing the menu from opening before results are fetched asynchronously. Also has the effect of opening the menu when the | ||
boolean
| false | |
Adds a hover effects to a table rows. | ||
'asc' | 'desc' | 'asc' | |
Specifies the initial sort order when an unsorted column is clicked. | ||
any[] | [] | |
An array of strings or objects used for automatically generating children components. | ||
SelectItemKey | null | |
Property on supplied | ||
string | number | 10 | |
Changes how many items per page should be visible. Can be bound to external variable using v-model:itemsPerPage… Setting this prop to | ||
(number | { title: string; value: number })[] | [ {value: 10, title: '10'}, {value: 25, title: '25'}, {value: 50, title: '50'}, {value: 100, title: '100'}, {value: -1, title: '$vuetify.dataFooter.itemsPerPageAll'} ] | |
Array of options to show in the items-per-page dropdown. | ||
string
| '$vuetify.dataFooter.itemsPerPageText' | |
Text for items-per-page dropdown. | ||
SelectItemKey | 'id' | |
Property on supplied | ||
| string | (string | [string, number])[] | (new () => any) | FunctionalComponent | '$last' | |
Last icon. | ||
string
| '$vuetify.dataFooter.lastPage' | |
Label for last page. | ||
string | boolean | false | |
Displays linear progress bar. Can either be a String which specifies which color is applied to the progress bar (any material color or theme color - primary, secondary, success, info, warning, error) or a Boolean which uses the component color (set by color prop - if it’s supported by the component) or the primary color. | ||
string
| '$vuetify.dataIterator.loadingText' | |
Text shown when the data is loading. | ||
boolean
| false | |
Determines the display mode of the component. If true, the component will be displayed in mobile mode. If false, the component will be displayed in desktop mode. If null, will be based on the current mobile-breakpoint | ||
number | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl' | undefined | |
Overrides the display configuration default screen size that the component should be considered in mobile. | ||
unknown
| [] | |
The v-model value of the component. If component supports the multiple prop, this defaults to an empty array. | ||
| boolean | { key: 'ctrl'; mode: 'prepend' | 'append'; modifier: 'shift' | 'alt' } | false | |
Let user sort by multiple properties/columns.
| ||
boolean
| false | |
Forces sorting on the column(s). | ||
| string | (string | [string, number])[] | (new () => any) | FunctionalComponent | '$next' | |
Next icon. | ||
string
| '$vuetify.dataFooter.nextPage' | |
Label for next page. | ||
string
| '$vuetify.noDataText' | |
Text shown when no items are provided to the component. | ||
boolean
| false | |
Disables all item filtering. | ||
string | number | 1 | |
The current displayed page number (1-indexed). | ||
'item' | 'auto' | 'any' | 'any' | |
Controls how pagination counts items.
| ||
string
| '$vuetify.dataFooter.pageText' | |
Label for page number. | ||
| string | (string | [string, number])[] | (new () => any) | FunctionalComponent | '$prev' | |
Previous icon. | ||
string
| '$vuetify.dataFooter.prevPage' | |
Label for previous page. | ||
boolean
| false | |
Changes the selection behavior to return the object directly rather than the value specified with item-value. | ||
| Record<string, any> | (( data: Pick<ItemKeySlot<any>, 'item' | 'index' | 'internalItem'>, ) => Record<string, any>) | undefined | |
An object of additional props to be passed to each | ||
string
| undefined | |
Text input used to filter items. | ||
'all' | 'page' | 'single' | 'page' | |
Defines the strategy of selecting items in the list. Possible values are: ‘single’ (only one item can be selected at a time), ‘page’ (‘Select all’ button will select only items on the current page), ‘all’ (‘Select all’ button will select all items in the list). | ||
boolean
| false | |
Show current page number between prev/next icons. | ||
boolean
| false | |
Shows the expand toggle in default rows. | ||
boolean
| false | |
Shows the select checkboxes in both the header and rows (if using default rows). | ||
| string | (string | [string, number])[] | (new () => any) | FunctionalComponent | '$sortAsc' | |
Icon used for ascending sort button. | ||
SortItem[] | [] | |
Changes which item property (or properties) should be used for sort order. Can be bound to external variable using v-model:sortBy… | ||
| string | (string | [string, number])[] | (new () => any) | FunctionalComponent | '$sortDesc' | |
Icon used for descending sort button. | ||
| string | (string | [string, number])[] | (new () => any) | FunctionalComponent | undefined | |
Icon used for unsorted columns. By default it uses either sortAscIcon or sortDescIcon depending on initialSortOrder, but can be customized to show a neutral icon instead. | ||
boolean
| false | |
Deprecated, use | ||
'odd' | 'even' | null | |
Applies a background to either even or odd rows. | ||
string | (new () => any) | FunctionalComponent | 'div' | |
Specify a custom tag used on the root element. | ||
string
| undefined | |
Specify a theme for this component and all of its children. | ||
(a: any, b: any) => boolean | undefined | |
Apply a custom comparison algorithm to compare model-value and values contains in the items prop. | ||
string | number | undefined | |
Sets the width for the component. | ||
name | type | |
|---|---|---|
[any] | ||
Emits with the items currently being displayed. | ||
[any] | ||
Emits when the expanded items are updated. | ||
[any] | ||
Emits when the group-by prop is updated. | ||
[number] | ||
Emits when the items-per-page prop is updated. | ||
[unknown] | ||
Emits when the component’s model changes. | ||
[any] | ||
Emits when pagination related properties (page, itemsPerPage, sortBy, groupBy, search) is updated. | ||
[number] | ||
Emits when the page prop is updated. | ||
[any] | ||
Emits when the sortBy prop is updated. | ||
Slot for custom rendering of a header cell. | ||
Slot for custom rendering of a row cell. | ||
Slot to replace the default table | ||
Appends elements to the end of the default table | ||
Prepends elements to the start of the default table | ||
Slot for custom rendering of a data table footer. | ||
Slot to replace the default rendering of the | ||
Slot for custom rendering of a group. | ||
Slot for custom rendering of a header cell with the select checkbox. | ||
The default Vue slot. | ||
Slot for custom rendering of an expanded row. | ||
Adds content to the empty space in the footer. | ||
Slot for custom rendering of a group header. | ||
Slot for custom rendering of a group summary. | ||
Slot to replace the default | ||
Slot to replace the default | ||
An array of objects that each describe a header column. | ||
Slot to replace the default rendering of a row. | ||
Slot to replace the default | ||
Slot to replace the default | ||
Slot for custom loader (displayed when loading prop is equal to true). | ||
Defines content for when | ||
Defines content for when no items are provided. | ||
Slot to replace the default table | ||
Slot to replace the default table | ||
Slot to replace the default table | ||
Slot to add content above the table. | ||
name | default |
|---|---|
116px | |
0 16px | |
8px | |
8px 4px | |
16px | |
90px | |
tools.theme-color('on-surface', var(--v-disabled-opacity)) | |
rgba(var(--v-theme-on-surface)) | |
rgba(var(--v-border-color), var(--v-border-opacity)) | |
20px | |
.0 | |
.5 | |
0px | |
var(--v-disabled-opacity) |