API Docs for: 3.0.1.91d25ad1
Show:

Utils.ModelsTableColumn Class

Extends Ember.Object

Column definition class for ModelsTable columns

Check its public properties

Methods

cleanFilterString

() protected

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: ''

colspanForFilterCell

Number

Colspan for cell in the filters-row

Default: 1

colspanForSortCell

Number

Colspan for cell in the sorting-row

Default: 1

component

String

Custom component used in the column's cells.

It will receive several options:

Default: ''

componentForEdit

String

Custom component used in the column's cells when the row is in edit mode

It will receive several options:

Default: ''

componentForFilterCell

String

Custom component used in the header cell with filter

It will receive several options:

Default: ''

componentForFooterCell

String

Custom component used in the footer cell

It will receive several options:

  • selectedItems - bound from ModelsTable.selectedItems
  • expandedItems - bound from ModelsTable.expandedItems
  • data - whole dataset passed to the models-table
  • mappedSelectedItems - selectedItems mapped by propertyName
  • mappedExpandedItems - expandedItems mapped by propertyName
  • mappedData - data mapped by propertyName

Default: ''

componentForSortCell

String

Custom component used in the header cell with sorting and column title

It will receive several options:

Default: ''

cssPropertyName

String protected

data

Object[] protected

Default: []

defaultVisible

Boolean private

Value inverted to the isHidden initial value

It set on column init and not changed any more

disableFiltering

Boolean

If filtering should be disabled for this column

Default: false

disableSorting

Boolean

If sorting should be disabled for this column

Default: false

editable

Boolean | Function

Is this column allowed to be editable

Default: true

filteredBy

String

Custom data's property that is used to filter column. If it isn't provided, propertyName is used

Default: null

filterField

String protected

filterFunction

Function

Custom function used to filter rows (used if filterWithSelect is false)

Default: null

filterPlaceholder

String

Placeholder for filter-input

Default: ''

filterString

String

FilterString a default filtering for this column

Default: ''

filterUsed

Boolean protected

Default: false

filterWithSelect

Boolean

If true select-dropdown will be used for filtering by current column. Options are unique values for data.@each.${propertyName}

Default: false

isHidden

Boolean

Is current column hidden by default

Default: false

isVisible

Boolean protected

Default: true

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 protected

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: ''

realColspanForFilterCell

Number protected

Default: 1

realColspanForSortCell

Number protected

Default: 1

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

sortAsc

Boolean protected

Default: true

sortDesc

Boolean protected

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

sortField

String protected

sortFilterOptions

Boolean

Should options in the select-box be sorted

Default: false

sortFunction

Function

Optional custom function used to sort rows

Default: null

sorting

String

Sort direction for column

Default: ''

sortPrecedence

Number

Sort precedence for this column - needs to be larger than -1 for sortDirection to take effect

Default: null

title

String

Header for column. If it isn't provided, capitalized propertyName is used

Default: ''

useFilter

Boolean protected

Allow filtering for column or not

Default: true

useSorting

Boolean protected

Allow sorting for column or not

Default: true