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

PopupFilter

Extends:

Feature → PopupFilter

Pop-up filter component

Constructor Summary

Public Constructor
public

Creates an instance of PopupFilter

Member Summary

Public Members
public

Active filter icon path

public

Ensure filter's container element width matches column width, enabled by default

public

Close active popup filter upon filtering, enabled by default

public

Css class assigned to filter container element

public

HTML for the filter icon

public

Filter icon path

public
public

Callback fired after a popup filter is closed

public

Callback fired after a popup filter is opened

public

Callback fired before a popup filter is closed

public

Callback fired before a popup filter is opened

public

Css class assigned to the popup container element

Method Summary

Public Methods
public

build(colIndex: Number, div: Object)

Build a specified pop-up filter elements

public

Build all pop-up filters elements

public

Build all filters icons

public

changeState(colIndex: Number, active: Boolean)

Apply specified icon state

public

close(colIndex: Number)

Close popup filter of specified column

public

closeAll(exceptIdx: Number)

Close all filters excepted for the specified one if any

public

Remove pop-up filters

public

init()

Initialize DOM elements

public

isOpen(colIndex: Number): Boolean

Check if popup filter for specified column is open

public

open(colIndex: Number)

Open popup filter of specified column

public

reset()

Reset previously destroyed feature

public

Build all the icons representing the pop-up filters

public

toggle(colIndex: Number)

Toggle visibility of specified filter

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

Public Constructors

public constructor(tf: TableFilter) source

Creates an instance of PopupFilter

Override:

Feature#constructor

Params:

NameTypeAttributeDescription
tf TableFilter

TableFilter instance

Public Members

public activeIconPath: string source

Active filter icon path

public adjustToContainer: Boolean source

Ensure filter's container element width matches column width, enabled by default

public closeOnFiltering: Boolean source

Close active popup filter upon filtering, enabled by default

public containerCssClass: String source

Css class assigned to filter container element

public iconHtml: string source

HTML for the filter icon

public iconPath: String source

Filter icon path

public initialized: boolean source

Field indicating whether Feature is initialized

Override:

Feature#initialized

public onAfterClose: Function source

Callback fired after a popup filter is closed

public onAfterOpen: Function source

Callback fired after a popup filter is opened

public onBeforeClose: Function source

Callback fired before a popup filter is closed

public onBeforeOpen: Function source

Callback fired before a popup filter is opened

public placeholderCssClass: String source

Css class assigned to the popup container element

Public Methods

public build(colIndex: Number, div: Object) source

Build a specified pop-up filter elements

Params:

NameTypeAttributeDescription
colIndex Number

Column index

div Object

Optional container DOM element

public buildAll() source

Build all pop-up filters elements

public buildIcons() source

Build all filters icons

public changeState(colIndex: Number, active: Boolean) source

Apply specified icon state

Params:

NameTypeAttributeDescription
colIndex Number

Column index

active Boolean

Apply active state

public close(colIndex: Number) source

Close popup filter of specified column

Params:

NameTypeAttributeDescription
colIndex Number

Column index

public closeAll(exceptIdx: Number) source

Close all filters excepted for the specified one if any

Params:

NameTypeAttributeDescription
exceptIdx Number

Column index of the filter to not close

public destroy() source

Remove pop-up filters

Override:

Feature#destroy

public init() source

Initialize DOM elements

Override:

Feature#init

public isOpen(colIndex: Number): Boolean source

Check if popup filter for specified column is open

Params:

NameTypeAttributeDescription
colIndex Number

Column index

Return:

Boolean

public open(colIndex: Number) source

Open popup filter of specified column

Params:

NameTypeAttributeDescription
colIndex Number

Column index

public reset() source

Reset previously destroyed feature

Override:

Feature#reset

public setIconsState() source

Build all the icons representing the pop-up filters

public toggle(colIndex: Number) source

Toggle visibility of specified filter

Params:

NameTypeAttributeDescription
colIndex Number

Column index