Home Reference Source
import {CheckList} from 'tablefilter/src/modules/checkList.js'
public class | source

CheckList

Extends:

FeatureBaseDropdown → CheckList

Checklist filter UI component

Constructor Summary

Public Constructor
public

Creates an instance of CheckList

Member Summary

Public Members
public

Text placed in the filter's container when load filter on demand feature is enabled

public

Css class for the container of the checklist filter (div)

public

List of container DOM elements

public

Css class for a disabled item of a checklist (li)

public

Enable the reset filter option as first item

public
public

Css class for the checklist filter element (ul)

public
public
public

Css class for the item of a checklist (li)

public

opts: *[]

public

optsTxt: *[]

public

Css class for a selected item of a checklist (li)

Method Summary

Public Methods
public

build(colIndex: Number, isLinked: Boolean)

Build checklist UI

public

Destroy CheckList instance

public

getValues(colIndex: Number): Array

Get filter values for a given column index

public

init(colIndex: Number, isExternal: Boolean, container: DOMElement)

Initialize checklist filter

public

Refresh all checklist filters

public

selectOptions(colIndex: Number, values: Array)

Select filter options programmatically

Inherited Summary

From class Feature
public

TableFilter configuration

public

TableFilter emitter instance

public

TableFilter feature setting

public

Feature name is the camelised class name as per TableFilter's convention

public

Field indicating whether Feature is initialized

public

TableFilter instance

public

Destroy the feature

public

Disable the feature

public

enable()

Enable the feature

public

init()

Initialize the feature

public

Indicate whether the feature is enabled or not

public

reset()

Reset the feature after being disabled

From class BaseDropdown
public

Filter options custom sorter on a column basis

public

isValidLinkedValue(rowIdx: Number, activeFilterIdx: Number): Boolean

Check passed row contains a valid linked value

public

Refresh linked filters to offer only selected options

Public Constructors

public constructor(tf: TableFilter) source

Creates an instance of CheckList

Override:

BaseDropdown#constructor

Params:

NameTypeAttributeDescription
tf TableFilter

TableFilter instance

Public Members

public activateText: String source

Text placed in the filter's container when load filter on demand feature is enabled

public containerCssClass: String source

Css class for the container of the checklist filter (div)

public containers: Array source

List of container DOM elements

public disabledItemCssClass: String source

Css class for a disabled item of a checklist (li)

public enableResetOption: Boolean source

Enable the reset filter option as first item

public excludedOpts: *[] source

public filterCssClass: String source

Css class for the checklist filter element (ul)

public initialized: boolean source

Field indicating whether Feature is initialized

Override:

Feature#initialized

public isCustom: * source

public itemCssClass: String source

Css class for the item of a checklist (li)

public opts: *[] source

public optsTxt: *[] source

public selectedItemCssClass: String source

Css class for a selected item of a checklist (li)

Public Methods

public build(colIndex: Number, isLinked: Boolean) source

Build checklist UI

Params:

NameTypeAttributeDescription
colIndex Number

Column index

isLinked Boolean

Enable linked filters behaviour

public destroy() source

Destroy CheckList instance

Override:

Feature#destroy

public getValues(colIndex: Number): Array source

Get filter values for a given column index

Params:

NameTypeAttributeDescription
colIndex Number

Column index

Return:

Array

values Collection of selected values

public init(colIndex: Number, isExternal: Boolean, container: DOMElement) source

Initialize checklist filter

Override:

Feature#init

Params:

NameTypeAttributeDescription
colIndex Number

Column index

isExternal Boolean

External filter flag

container DOMElement

Dom element containing the filter

public refreshAll() source

Refresh all checklist filters

public selectOptions(colIndex: Number, values: Array) source

Select filter options programmatically

Params:

NameTypeAttributeDescription
colIndex Number

Column index

values Array

Array of option values to select