new Column( props )

Description
A class responsible for handling a full column with its header.
Parameters
Name Type Description
props object A configuration object for the column.
Name Type Attributes Default Description
align 'left' | 'center' | 'right' <optional>
'left' The alignment direction of the cells in this column.
headerAlign 'left' | 'center' | 'right' <optional>
'center' The alignment direction of the cells in this column.
label string <optional>
'' The label displayed in the header.
field string <optional>
'' The name of the field in the row object.
representedAs function <optional>
A transformation function that returns the string to display
component * <optional>
.... Yeah I don't know what it is.
interpolate boolean <optional>
false Set to true to convert the return value of `props.representedAs` to HTML.
headerComponent VueDatatableHeader <optional>
The header cell component of the column.
sortable boolean <optional>
true Controls whetever this column can be sorted.
filterable boolean <optional>
true Controls whetever this column can be filtered.
headerClass string <optional>
'' The base CSS class to apply to the header component.
Details

Members


component :*|null

Description
.... Yeah I don't know what it is.
Details
* | null

field :string

Description
The name of the field in the row object.
Details
string

representedAs :function|null

Description
A transformation function that returns the string to display
Details
function | null

interpolate :boolean

Description
Set to true to convert the return value of `props.representedAs` to HTML.
Details
boolean

headerAlign :string

Description
The alignment direction of the header of this column.
Details
string

headerComponent :VueDatatableHeader|null

Description
The header cell component of the column.
Details
VueDatatableHeader | null

headerClass :string

Description
The base CSS class to apply to the header component.
Details
string

label :string

Description
The label displayed in the header.
Details
string

sortable :boolean

Description
Controls whetever this column can be sorted.
Details
boolean

filterable :boolean

Description
Controls whetever this column can be filtered.
Details
boolean

align :string

Description
The alignment direction of the cells in this column.
Details
string

Methods


<static> normalizeAlignment( align, defaultAlign ) → {'left'|'center'|'right'}

Description
Normalize the alignment, using the requested default value.
Parameters
Name Type Default Description
align * The raw desired alignment
defaultAlign 'left' | 'center' | 'right' left The default alignment to use, if the 1st parameter isn't recognized
Returns
The normalized alignment
Details

<static> isPlainTextField( props ) → {boolean}

Description
Check if the column use plain text value (eg `representedAs` or `field`, but not `component`) If multiple representation props are provided, it is considered as plain text if there are alternatives to `component`
Parameters
Name Type Description
props object The column definition object
Returns
- `true` if the column can be represented by plain text, `false` otherwise
Details

<static> isFilterable( props ) → {boolean}

Description
Check if the column can be filtered.
Parameters
Name Type Description
props object The column definition object
Returns
- `true` if the column can be filtered, `false` otherwise
Details

<static> isSortable( props ) → {boolean}

Description
Check if the column can be sorted.
Parameters
Name Type Description
props object The column definition object
Returns
- `true` if the column can be sorted, `false` otherwise
Details

getRepresentation( row ) → {string}

Description
Converts a row to its string representation for the current column.
Parameters
Name Type Description
row object The row to convert
Returns
- The string representation of this row in the current column.
Details

matches( row, filterString ) → {boolean}

Description
Check if the provided row's representation matches a certain filter string.
Parameters
Name Type Description
row object The row to check.
filterString string The filter string to test.
Returns
- `true` if the row matches the filter, `false` otherwise.
Details