Utils.ModelsTableColumn Class
Column definition class for ModelsTable columns
Check its public properties
Item Index
Methods
Properties
- className
- colspanForSortCell
- colspanForSortCell
- component
- componentForEdit
- componentForFilterCell
- componentForFooterCell
- componentForSortCell
- cssPropertyName
- defaultVisible
- disableFiltering
- disableSorting
- editable
- filteredBy
- filterField
- filterFunction
- filterPlaceholder
- filterString
- filterUsed
- filterWithSelect
- isHidden
- isVisible
- mayBeHidden
- originalDefinition
- predefinedFilterOptions
- propertyName
- realColspanForFilterCell
- realColspanForSortCell
- routeName
- routeProperty
- simple
- sortAsc
- sortDesc
- sortDirection
- sortedBy
- sortField
- sortFilterOptions
- sortFunction
- sorting
- sortPrecedence
- title
- useFilter
- useSorting
Methods
cleanFilterString
()
private
If preselected option doesn't exist after filterOptions
update,
filterString
is reverted to empty string (basically, filtering for this column is dropped)
Properties
className
String
Custom class-name for cells in the current column. This class-name will also be added to the header and filter of the column
Default: ''
component
String
Custom component used in the column's cells.
It will receive several options:
data
- whole dataset passed to themodels-table
record
- current rowindex
- current row indexcolumn
- current column (one of the processedColumns)sendAction
- closure action ModelsTable.actions.sendActionexpandRow
- closure action ModelsTable.actions.expandRowcollapseRow
- closure action ModelsTable.actions.collapseRowexpandAllRows
- closure action ModelsTable.actions.expandAllRowscollapseAllRows
- closure action ModelsTable.actions.collapseAllRowsclickOnRow
- closure action ModelsTable.actions.clickOnRoweditRow
- closure action ModelsTable.actions.editRowcancelEditRow
- closure action ModelsTable.actions.cancelEditRowthemeInstance
- bound from ModelsTable.themeInstanceisExpanded
- is current row expandedisSelected
- is current row selectedisEditRow
- is the row editable (one of the processedColumns)isColumnEditable
- is the column currently editable
Default: ''
componentForEdit
String
Custom component used in the column's cells when the row is in edit mode
It will receive several options:
data
- whole dataset passed to themodels-table
record
- current rowindex
- current row indexcolumn
- current column (one of the processedColumns)sendAction
- closure action ModelsTable.actions.sendActionexpandRow
- closure action ModelsTable.actions.expandRowcollapseRow
- closure action ModelsTable.actions.collapseRowexpandAllRows
- closure action ModelsTable.actions.expandAllRowscollapseAllRows
- closure action ModelsTable.actions.collapseAllRowsclickOnRow
- closure action ModelsTable.actions.clickOnRoweditRow
- closure action ModelsTable.actions.editRowcancelEditRow
- closure action ModelsTable.actions.cancelEditRowthemeInstance
- bound from ModelsTable.themeInstanceisExpanded
- is current row expandedisSelected
- is current row selectedisEditRow
- is the row editable (one of the processedColumns)isColumnEditable
- is the column currently editable
Default: ''
componentForFilterCell
String
Custom component used in the header cell with filter
It will receive several options:
column
- current column (one of the processedColumns)data
- whole dataset passed to themodels-table
selectedItems
- bound from ModelsTable.selectedItemsexpandedItems
- bound from ModelsTable.expandedItemsthemeInstance
- bound from ModelsTable.themeInstancesendAction
- closure action ModelsTable.actions.sendActionexpandAllRows
- closure action ModelsTable.actions.expandAllRowscollapseAllRows
- closure action ModelsTable.actions.collapseAllRowstoggleAllSelection
- closure action ModelsTable.actions.toggleAllSelection
Default: ''
componentForSortCell
String
Custom component used in the header cell with sorting and column title
It will receive several options:
column
- current column (one of the processedColumns)data
- whole dataset passed to themodels-table
selectedItems
- bound from ModelsTable.selectedItemsexpandedItems
- bound from ModelsTable.expandedItemsthemeInstance
- bound from ModelsTable.themeInstancesendAction
- closure action ModelsTable.actions.sendActionexpandAllRows
- closure action ModelsTable.actions.expandAllRowscollapseAllRows
- closure action ModelsTable.actions.collapseAllRowstoggleAllSelection
- closure action ModelsTable.actions.toggleAllSelection
Default: ''
defaultVisible
Boolean
private
Value inverted to the isHidden initial value
It set on column init and not changed any more
filteredBy
String
Custom data's property that is used to filter column. If it isn't provided, propertyName
is used
Default: null
filterWithSelect
Boolean
If true
select-dropdown will be used for filtering by current column. Options are unique values for data.@each.${propertyName}
Default: false
mayBeHidden
Boolean
Can current column be hidden. This field determines, if column appears in the columns-dropdown. If mayBeHidden
is true
and isHidden
is also true
for column, this column always be hidden
Default: true
originalDefinition
Object
private
Object containing the definition of the column passed into the component
Default: null
predefinedFilterOptions
String[] | Number[] | Boolean[]
List of option to the filter-box (used if filterWithSelect is true)
Default: null
propertyName
String
Field-name of the data's object shown in the current column. If it isn't provided, sorting and filtering options for current column are ignored
Default: ''
routeName
String
If this property is defined, link to the route will be rendered in the cell. propertyName is used as an anchor. If it's not declared, id
will be used.
Main idea for routeName
is to provide a simple way to generate links for each model in the data
. It should not be used for any other purposes
Default: ''
routeProperty
String
If this property is defined, link to the route will be rendered in the cell. routeProperty is used as an anchor. If it's not declared, id
will be used.
Main idea for routeName
is to provide a simple way to generate links for each model in the data
. It should not be used for any other purposes
Default: ''
simple
Boolean
If true
only propertyName
will be shown in the column's cells and no components etc. Edit-mode won't affect such column.
If false
column's cells will be processed as usual (components will be used to display data and for edit-mode)
Default: false
sortDirection
String
The default sorting for this column. Can be either asc
or desc
. Needs to be set in conjunction with sortPrecedence
,
otherwise it will not have any effect
Default: ''
sortedBy
String
Field-name for sorting by current column. If it isn't provided, propertyName
is used
Default: null
sortPrecedence
Number
Sort precedence for this column - needs to be larger than -1 for sortDirection to take effect
Default: ''