Skip to main content

abstract Filter

Base class for DataFrame-bound filtering controls. Supports collaborative filtering by efficiently working together with other filters.

Extends

Constructors

new Filter()

new Filter(): Filter

Returns

Filter

Overrides

Widget . constructor

Source

src/widgets.ts:374

Properties

PropertyModifierTypeDefault valueDescriptionInherited from
_propertiesprotectedProperty[]undefined-Widget._properties
_rootprotectedHTMLElementundefined-Widget._root
columnpublicnull | Column<any>nullA column this filter is associated with.-
columnName?publicstringundefined--
controlspublicHTMLDivElementundefinedGroup of control icons on the right of the filter header, after the name. FilterGroup takes care of its visibility.-
dartpublicanyundefined-Widget.dart
dataFramepublicnull | DataFrameundefinedA DataFrame this filter is associated with.-
factorypublicnull | FuncnullConstructor function. No parameters, returns [Widget].Widget.factory
indicatorpublicHTMLDivElementundefinedAn indicator icon on the left of the filter header, before the name. A filter is responsible for hiding or showing it, depending on its state.-
isDetachedpublicbooleanfalse-Widget.isDetached
propspublicanyundefined-Widget.props
subspublicSubscription[]undefined-Widget.subs
temppublicanyundefinedContains auxiliary informationWidget.temp

Accessors

caption

get caption(): string

Caption to be shown in the filter group.

Returns

string

Source

src/widgets.ts:372


filterSummary

get abstract filterSummary(): string

Override to provide short filter summary that might be shown on viewers or in the context panel.

Returns

string

Source

src/widgets.ts:407


isFiltering

get isFiltering(): boolean

Override to indicate whether the filter actually filters something (most don't in the initial state). This is used to minimize the number of unnecessary computations. Make sure to call super.isFiltering to check whether the filter has been disabled by the user

Returns

boolean

Source

src/widgets.ts:398


isReadyToApplyFilter

get isReadyToApplyFilter(): boolean

Whether a filter is ready to apply the filtering mask synchronously.

Returns

boolean

Source

src/widgets.ts:404


root

get root(): HTMLElement

Widget's visual root.

set root(r): void

Parameters

ParameterType
rHTMLElement

Returns

HTMLElement

Source

src/widgets.ts:291


type

get type(): string

Returns

string

Source

src/widgets.ts:201

Methods

addProperty()

private addProperty(propertyName, propertyType, defaultValue, options): any

Registers an property with the specified type, name, and defaultValue.

Parameters

ParameterTypeDefault valueDescription
propertyNamestringundefined
propertyType"string" | "bigint" | "object" | "map" | "file" | "view" | "int" | "double" | "bool" | "byte_array" | "datetime" | "qnum" | "dataframe" | "num" | "string_list" | "dataframe_list" | "cell" | "column" | "column_list" | "graphics" | "tablerowfiltercall" | "colfiltercall" | "bitset" | "dynamic" | "viewer" | "list" | "semantic_value" | "func" | "funccall" | "property" | "categorical" | "numerical" | "GridCellRenderArgs" | "element" | "TableView" | "User" | "Menu" | "Project" | "event_data" | "progressindicator" | "Credentials" | "ScriptEnvironment" | "Notebook"undefined
defaultValueanynull
optionsnull | object & PropertyOptionsnull

Returns

any

Inherited from

Widget . addProperty

See

Registered property gets added to properties. Returns default value, thus allowing to combine registering a property with the initialization

Source

src/widgets.ts:312


apply()

apply(properties): Widget<any>

Parameters

ParameterTypeDescription
propertiesobject

Returns

Widget<any>

Inherited from

Widget . apply

Source

src/widgets.ts:262


applyFilter()

abstract applyFilter(): void

Override to filter the dataframe. The method should work with this.dataFrame.filter, should disregard false values (these are filtered out already by other filters), and should filter out corresponding indexes.

Returns

void

Source

src/widgets.ts:413


applyState()

applyState(state): void

Override to load filter state.

Parameters

ParameterType
stateany

Returns

void

Source

src/widgets.ts:424


attach()

attach(dataFrame): void

Gets called when a data frame is attached. Make sure to call super.attach(dataFrame) when overriding.

Parameters

ParameterTypeDescription
dataFrameDataFrame

Returns

void

Source

src/widgets.ts:432


detach()

detach(): void

Gets called when a widget is detached and will no longer be used. Typically used for unsubscribing from events. Be sure to call super.detach() if this method is overridden.

Returns

void

Overrides

Widget . detach

Source

src/widgets.ts:448


getDartProperties()

getDartProperties(): any[]

Returns

any[]

Inherited from

Widget . getDartProperties

Source

src/widgets.ts:278


getProperties()

getProperties(): Property[]

Returns

Property[]

Inherited from

Widget . getProperties

Source

src/widgets.ts:272


onFrameAttached()

onFrameAttached(dataFrame): void

Parameters

ParameterType
dataFrameDataFrame

Returns

void

Inherited from

Widget . onFrameAttached

Source

src/widgets.ts:284


onPropertyChanged()

onPropertyChanged(property): void

Gets called when viewer's property is changed.

Parameters

ParameterTypeDescription
propertynull | Propertyor null, if multiple properties were changed.

Returns

void

Inherited from

Widget . onPropertyChanged

Source

src/widgets.ts:276


refresh()

refresh(): void

Gets called when a previously used filter gets moved in the DOM tree. Normally, you don't need to do anything, but this might be handy for the iframe-based filters.

Returns

void

Source

src/widgets.ts:446


saveState()

saveState(): any

Override to save filter state.

Returns

any

Source

src/widgets.ts:416


sourceRowsChanged()

sourceRowsChanged(): void

Returns

void

Inherited from

Widget . sourceRowsChanged

Source

src/widgets.ts:282


sub()

sub(subscription): void

Registers a subscription to an external event.

Parameters

ParameterTypeDescription
subscriptionSubscription

Returns

void

Inherited from

Widget . sub

Source

src/widgets.ts:255


toDart()

toDart(): any

Returns

any

Inherited from

Widget . toDart

Source

src/widgets.ts:247


find()

static find(root): null | Widget<any>

Finds existing widget from its visual root.

Parameters

ParameterType
rootElement

Returns

null | Widget<any>

Inherited from

Widget . find

Source

src/widgets.ts:243


fromRoot()

static fromRoot(root): Widget<any>

Creates a new widget from the root element.

Parameters

ParameterType
rootHTMLElement

Returns

Widget<any>

Inherited from

Widget . fromRoot

Source

src/widgets.ts:335


getAll()

static getAll(): Widget<any>[]

Returns all currently active widgets.

Returns

Widget<any>[]

Inherited from

Widget . getAll

Source

src/widgets.ts:238