Filter
Defined in: src/widgets/filter.ts:15
Base class for DataFrame-bound filtering controls. Supports collaborative filtering by efficiently working together with other filters.
Extends
Constructors
Constructor
new Filter():
Filter
Defined in: src/widgets/filter.ts:36
Returns
Filter
Overrides
Properties
| Property | Modifier | Type | Default value | Description | Inherited from | Defined in |
|---|---|---|---|---|---|---|
_functions | protected | Func[] | [] | - | Widget._functions | src/widgets/base.ts:243 |
_properties | protected | Property[] | [] | - | Widget._properties | src/widgets/base.ts:242 |
_root | protected | HTMLElement | undefined | - | Widget._root | src/widgets/base.ts:241 |
column | public | Column<any, any> | null | null | A column this filter is associated with. | - | src/widgets/filter.ts:29 |
columnName? | public | string | undefined | - | - | src/widgets/filter.ts:31 |
controls | public | HTMLDivElement | undefined | Group of control icons on the right of the filter header, after the name. FilterGroup takes care of its visibility. | - | src/widgets/filter.ts:23 |
dart | public | any | undefined | - | Widget.dart | src/widgets/base.ts:246 |
dataFrame | public | DataFrame | null | undefined | A DataFrame this filter is associated with. | - | src/widgets/filter.ts:26 |
factory | public | Func | null | null | Constructor function. No parameters, returns [Widget]. | Widget.factory | src/widgets/base.ts:239 |
indicator | public | HTMLDivElement | undefined | An 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. | - | src/widgets/filter.ts:19 |
isDetached | public | boolean | false | - | Widget.isDetached | src/widgets/base.ts:247 |
props | public | any | undefined | - | Widget.props | src/widgets/base.ts:244 |
subs | public | Subscription[] | undefined | - | Widget.subs | src/widgets/base.ts:245 |
temp | public | any | undefined | Contains auxiliary information | Widget.temp | src/widgets/base.ts:236 |
Accessors
caption
Get Signature
get caption():
string
Defined in: src/widgets/filter.ts:34
Caption to be shown in the filter group.
Returns
string
children
Get Signature
get children():
Widget<any>[]
Defined in: src/widgets/base.ts:320
Parent widget up the DOM tree, or null.
Returns
Widget<any>[]
Inherited from
filterSummary
Get Signature
get
abstractfilterSummary():string
Defined in: src/widgets/filter.ts:69
Override to provide short filter summary that might be shown on viewers or in the context panel.
Returns
string
isFiltering
Get Signature
get isFiltering():
boolean
Defined in: src/widgets/filter.ts:60
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
isReadyToApplyFilter
Get Signature
get isReadyToApplyFilter():
boolean
Defined in: src/widgets/filter.ts:66
Whether a filter is ready to apply the filtering mask synchronously.
Returns
boolean
parent
Get Signature
get parent():
Widget<any> |null
Defined in: src/widgets/base.ts:317
Parent widget up the DOM tree, or null.
Returns
Widget<any> | null
Inherited from
root
Get Signature
get root():
HTMLElement
Defined in: src/widgets/base.ts:324
Widget's visual root.
Returns
HTMLElement
Set Signature
set root(
r):void
Defined in: src/widgets/base.ts:325
Parameters
| Parameter | Type |
|---|---|
r | HTMLElement |
Returns
void
Inherited from
type
Get Signature
get type():
string
Defined in: src/widgets/base.ts:233
Returns
string
Inherited from
Methods
apply()
apply(
properties):Widget
Defined in: src/widgets/base.ts:284
Parameters
| Parameter | Type | Description |
|---|---|---|
properties | object | - |
Returns
Inherited from
applyFilter()
abstractapplyFilter():void
Defined in: src/widgets/filter.ts:75
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
applyState()
applyState(
state):void
Defined in: src/widgets/filter.ts:86
Override to load filter state.
Parameters
| Parameter | Type |
|---|---|
state | any |
Returns
void
attach()
attach(
dataFrame):void
Defined in: src/widgets/filter.ts:94
Gets called when a data frame is attached. Make sure to call super.attach(dataFrame) when overriding.
Parameters
| Parameter | Type | Description |
|---|---|---|
dataFrame | DataFrame | - |
Returns
void
detach()
detach():
void
Defined in: src/widgets/filter.ts:114
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
getDartProperties()
getDartProperties():
any[]
Defined in: src/widgets/base.ts:305
Returns
any[]
Inherited from
getFunctions()
getFunctions():
Func[]
Defined in: src/widgets/base.ts:299
Functions that are applicable to this particular widget. Used in the UI to display context actions, and for the AI integrations.
Returns
Func[]
Inherited from
getProperties()
getProperties():
Property[]
Defined in: src/widgets/base.ts:295
Returns all properties of this widget.
Returns
Property[]
Inherited from
getWidgetStatus()
getWidgetStatus():
IWidgetStatus
Defined in: src/widgets/base.ts:371
Returns the widget's runtime structure for automated testing and introspection.
Returns
Inherited from
onActiveChanged()
onActiveChanged(
active):void
Defined in: src/widgets/filter.ts:107
Called when the filter's enabled state changes (checkbox toggled on the filter panel). Override to react to enable/disable.
Parameters
| Parameter | Type |
|---|---|
active | boolean |
Returns
void