API Docs for: 2.5.0.563646c7
Show:

Utils.ModelsTableColumn Class

Extends Ember.Object

Column definition class for ModelsTable columns

Check its public properties

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

colspanForSortCell

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 private

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

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

filterFunction

Function

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

filterPlaceholder

String

Placeholder for filter-input

Default: ''

filterString

String

FilterString a default filtering for this column

Default: ''

filterUsed

Boolean private

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 private

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

realColspanForFilterCell

Number private

Default: 1

realColspanForSortCell

Number private

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

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 private

sortDesc

Boolean private

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

sortFilterOptions

Boolean

Should options in the select-box be sorted

Default: false

sorting

Boolean

Sorting is column sorted now

Default: false

sortPrecedence

Number

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

Default: ''

title

String

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

Default: ''

useFilter

Boolean private

Allow filtering for column or not

useSorting

Boolean private

Allow sorting for column or not