Column
Demos
See the demos of Table
.
API
Props
Name | Type | Default | Description |
---|---|---|---|
title | string | - | The column title. |
field | string | - | The field name as a key of items in the data prop of the parent Table component. |
width | string=|number= | - | The column width in px value. |
sortable | boolean= | false | Whether current column is sortable. |
align | string= | - | The alignment of cell content in the column. Supports left / center / right . |
span | function(number): Object= | A function that defines how cells should span across rows/columns. The type is | |
desc | string | - | The description of the column head. |
filter-value | * | - |
The value of current filter condition. |
filter-multiple | boolean= | false | Whether the built-in filter is multi-select or not. |
filter-options | Array<Object> | - | The list of filter options, with items of type {label, value, options, disabled, ...} , see the options prop of the Select component. |
filter-title | string= | - | The title of the filter dropdown. |
allowed-orders | Array | [false, 'desc', 'asc'] | [^allowed-orders] |
tooltip | boolean | ((item: Object) => string) | - | Whether to automatically show tooltips when content overflows. The tooltip displays the field corresponding to the field prop of the [data ](. /table#props-data) prop of Table component the current column belongs to. When being a function, the item argument is the entire data item and the returned string will be displayed as tooltip content. |
Slots
Name | Description | ||||||
---|---|---|---|---|---|---|---|
head | The table head. | ||||||
foot | The table foot. | ||||||
default | The content of the table cell. Displays the property value corresponds to the The slot scope properties are the same as each item inside | ||||||
sub-row | The content of cells in a sub row. Sub row data comes from the Displays the value keyed by the The slot scope properties are the same as each item inside | ||||||
desc | The content of the description overlay. Will override the
| ||||||
filter | The content of the filter dropdown.
|