Methods
# static createActionButtonDatatableColumn()
Helper to create buttons/icons inside tables in V3.
- Create a Vue component that can be registered as a datatable (https://www.datatables.net/) column.
Usage: columns:[createIconActionButtonDatatableColumn({handleClick(row){console.log(row)}})]
Parameters:
| Name | Type | Description |
|---|---|---|
options.components |
*
|
define custom components |
options.template |
*
|
define custom template |
options.handleClick |
*
|
define custom click handler |
# static createSortableColumnDefinition(sortBy, display, title) → {Object}
Creates a sortable column definition object.Useful when you need to sort using one field and display a different field (i.g Sorting a Date column by timestamp but displaying a formatted date)
Parameters:
| Name | Type | Description |
|---|---|---|
sortBy |
string
|
The data property to sort by. |
display |
string
|
The data property to display. |
title |
string
|
The title of the column. |
A sortable column definition object.
Object
# static createTruFalseColumnDefinition(columnTitle, propertyName, optionsopt) → {Object}
Creates a column definition for a true/false (boolean) column.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
columnTitle |
string
|
The title of the column. |
||
propertyName |
string
|
The name of the property in the row data that corresponds to the column. |
||
options |
Object
|
<optional> |
{} | An optional object of configuration options. |
i18n |
Object
|
<optional> |
An object containing translation functions for internationalization. |
|
$t |
function
|
<optional> |
A translation function for internationalization. |
|
t |
function
|
<optional> |
Another translation function for internationalization. |
|
translate |
function
|
<optional> |
A third translation function for internationalization. |
|
falseI18nCode |
string
|
<optional> |
'common.no' | The code for the translation of the "false" value. |
trueI18nCode |
string
|
<optional> |
'common.yes' | The code for the translation of the "true" value. |
- A column definition object with a "title" property and a "data" function.
Object