Constructor
-
options
Parameters:
-
options
Object
Properties
- align
- ascending
- breakpoints
- cellClassNames
- cellComponent
- cellType
- classNames
- columnId
- component
- draggable
- droppable
- format
- hidden
- hideable
- isGroupColumn
- isHidden
- isVisibleGroupColumn
- label
- minResizeWidth
- parent
- resizable
- responsiveHidden
- sortable
- sorted
- subColumns
- syncArray
- syncEnabled
- type
- valuePath
- visibleSubColumns
- width
breakpoints
ArrayAn array of media breakpoints that determine when this column will be shown
If we have the following breakpoints defined in app/breakpoints.js
:
- mobile
- tablet
- desktop
And we want to show this column only for tablet and desktop media, the following
array should be specified: ['tablet', 'desktop']
.
If this property is null
, undefined
, or []
, then this column will always
be shown, regardless of the current media type.
cellComponent
StringComponent name for the column cells. This component is automatically passed row, column, and value variables, and you can specify a valuePath to set what property the value is set to.
cellType
StringType of cell component
You can create your own cell types by running the blueprint:
ember g cell-type my-cell-type
This will generate a component for you which represents the <td>
cells in the column. If you want to apply custom actions to the td
,
or do some custom styling of the td
with classNameBindings, all of that is
available to you in this component.
You can then specify the custom type you created as a string here, to use it.
Default: 'base'
draggable
BooleanWhether the column can be reorder via drag and drop.
CSS Classes:
is-draggable
is-dragging
is-drag-target
drag-left
drag-right
Default: false
format
FunctionA format function used to calculate a cell's value. This method will be passed
the raw value if valuePath
is specified.
parent
ColumnThe parent column (or group) for this sub-column. This will only have a value if this column is a sub-column. Note: this doesn't update if you move this sub-column to another parent after instantiation.
resizable
BooleanWhether the column can be resized.
CSS Classes:
is-resizable
is-resizing
Default: false
responsiveHidden
BooleanIf true, this column has been hidden due to the responsive behavior
Default: false
type
StringType of column component
You can create your own column types by running the blueprint:
ember g column-type my-column-type
This will generate a component for you which represents the <th>
element for the column. If you want to apply custom actions to the th
,
or do some custom styling of the th
with classNameBindings, all of that is
available to you in this component.
You can then specify the custom type you created as a string here, to use it.
Default: 'base'