Skip to content

EnTableToolbar ​

  • An EnTableBasic component with a toolbar
  • Uses the same core props as EnTableBasic
  • Toolbar contains copy to clipboard, download to csv, and simple text filtering
  • Slots available to add buttons and replace the buttons or entire toolbar area
  • Toaster message will display after copy if the Toaster is defined

Preview ​

Props ​

NameDescriptionDefaultControl
headings

An array containing the labels for the columns of the table and optional key that matches to data in the row object.

array
[…]complex object
rows

An array of table data containing objects or array of strings or numbers, where each object/array is a row of table data. Objects are recommended for full feature use.

array
[…]complex object
groups

Optional grouped table data. When provided (non-empty), the table renders one <tbody> per group, each opening with a colspanned heading row (see the group-heading slot) followed by that group's rows. Each group is an object of shape { label, rows }; any extra properties are passed through to the group-heading slot. Grouped mode bypasses pagination (all groups render). The consumer is responsible for the order of the groups and the order of rows within each group.

array
[…]complex object
showGroupHeadings

Whether each group opens with a heading row. Turn it off when the group is already identifiable from the rows themselves — a column repeating the group name, or a totals row that names it — and the heading would just be a redundant band. A group select-all still forces the row to render, since that is where its checkbox lives.

boolean
true
groupSelectAll

Adds a select-all checkbox to each group's heading row that toggles only that group's rows within the shared selection. Requires enableBulkAction and a non-empty groups; ignored otherwise.

boolean
false
rowType

The type of each row of the table.

string
"object"
headerClass

CSS class that will be applied to all table headers.

string
""
wrapHeader

Whether or not the text in the table headers should be wrapped.

boolean
true
enableBulkAction

Enables checkboxes for bulk actions. NOTE: must have a v-model binding to an array to work properly. Do NOT also add a manual { key: 'bulk-action' } entry to headings — this prop prepends the bulk-action column automatically, so a manual one produces a duplicate checkbox column.

boolean
false
bulkActionProperty

Sets a property to pull from each selected item instead of the full object. e.g. set to 'Id' if you want to only include the Id from the selected objects.

string
null
totals

Optional grand totals rendered in a <tfoot> beneath every row. Keys are column keys; only the columns whose heading sets total: true are shown, so a totals object deserialized from the same model as a row (every property present, the non-aggregated ones null) renders correctly. The label cell is the footer slot.

object
nullcomplex object
fixedLayout

Switches the table to a fixed layout, which makes column widths absolute rather than negotiable.

Widths are honoured either way in the ordinary case — this only changes the two situations where the automatic layout overrules them. Content that cannot wrap narrower than its column (a long unbroken code) stops widening that column and overflows instead, and widths that together exceed the table stop being scaled down to fit, so the table overflows its container. Columns with no width share whatever is left.

Reach for it when a width has to hold exactly. It is not needed to make widths work.

boolean
false
qaId

Id that can be set for automation selectors.

string
""
modelValue

Use v-model to bind to value of the bulk selected items.

unknown[]
unknown
fileName

Filename for csv download.

string
null
showButtons

Shows download and print buttons.

boolean
true
showFilter

Shows filter for searching table.

boolean
true
filterTerm

Shows filter for searching table.

string
""
useJsonDownload

Sets download to use the raw JSON instead of data in the table.

boolean
false
filterOnKeys

Pass an array of strings equal to the key values of the table columns or json data that should be filtered when searching.

unknown[]
unknown
filterPlaceholder

Sets the placeholder value for the text filter.

string
"Search table"
tableClass

Adds additional CSS classes to the built-in table.

string
""
showClipboardBtn

Shows the copy to clipboard button.

boolean
true
showCsvBtn

Shows the download CSV button.

boolean
true
hideToolbar

Hides the full toolbar. Can be used to control filtering by the filter term prop.

boolean
false
filterWidth

Sets a max-width on the filter input.

string | number
"250"
useSorting

Adds table sorting.

boolean
false
responsive

Uses table wrapper to make it scroll horizontally if needed.

boolean
false

Slots ​

toolbar

Replaces the full toolbar; must use slot variables to update filtering

Variables
NameTypeDescription
searchTermstring

String used to filter the table rows

updateFilterfunction

Function that can be used to update the filtering by passing in a string

bulk-action

Replaces the `Apply` button which is viewable when `enableBulkAction` is set to `true`

Variables
NameTypeDescription
selectedItemsarray

An array of the selected items for bulk actions.

toolbar-left

Places content on the left side of the toolbar

toolbar-buttons

Replaces all the buttons left of the filter.

additional-buttons

Places additional buttons to the right of the download buttons.

filter

Replaces the filter input; must use slot variables to update filtering

Variables
NameTypeDescription
searchTermstring

String used to filter the table rows

updateFilterfunction

Function that can be used to update the filtering by passing in a string

table

Replaces the full table; must use slot variables to keep flitering and download functionality

Variables
NameTypeDescription
rowsarray

Filtered table rows.

headingsarray

Mapped headings from the passed in prop.

${slot}

Dynamically generated slot based on the key or slot property in the heading object; used to modify the columns display value

Variables
NameTypeDescription
contentany

Default display value

rowobject

Full row object

row-indexnumber

Row index, does not take any pagination into account

heading-indexnumber

Column index

Events ​

update:model-value

Binds the selected rows to v-model

filter

Fires when they filtering changes

Payload
NameTypeDescription
filteredRowsarray

The filtered rows

apply-action

Fires on click of the apply button for bulk actions

Payload
NameTypeDescription
selectedItemsarray

The list of items that are selected.

Methods ​

No methods defined.

Examples ​

Custom filtering ​

Using bulk actions ​

Using pagination ​