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
Overrides
Source
Properties
| Property | Modifier | Type | Default value | Description | Inherited from |
|---|---|---|---|---|---|
_functions | protected | Func[] | [] | - | Widget._functions |
_properties | protected | Property[] | [] | - | Widget._properties |
_root | protected | HTMLElement | undefined | - | Widget._root |
column | public | null | Column<any, any> | null | A column this filter is associated with. | - |
columnName? | public | string | undefined | - | - |
controls | public | HTMLDivElement | undefined | Group of control icons on the right of the filter header, after the name. FilterGroup takes care of its visibility. | - |
dart | public | any | undefined | - | Widget.dart |
dataFrame | public | null | DataFrame | undefined | A DataFrame this filter is associated with. | - |
factory | public | null | Func | null | Constructor function. No parameters, returns [Widget]. | Widget.factory |
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. | - |
isDetached | public | boolean | false | - | Widget.isDetached |
props | public | any | undefined | - | Widget.props |
subs | public | Subscription[] | undefined | - | Widget.subs |
temp | public | any | undefined | Contains auxiliary information | Widget.temp |
Accessors
caption
getcaption():string
Caption to be shown in the filter group.
Returns
string
Source
children
getchildren():Widget<any>[]
Parent widget up the DOM tree, or null.
Returns
Widget<any>[]
Source
filterSummary
getabstractfilterSummary():string
Override to provide short filter summary that might be shown on viewers or in the context panel.
Returns
string
Source
isFiltering
getisFiltering():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
isReadyToApplyFilter
getisReadyToApplyFilter():boolean
Whether a filter is ready to apply the filtering mask synchronously.
Returns
boolean
Source
parent
getparent():null|Widget<any>
Parent widget up the DOM tree, or null.
Returns
null | Widget<any>
Source
root
getroot():HTMLElement
Widget's visual root.
setroot(r):void
Parameters
| Parameter | Type |
|---|---|
r | HTMLElement |
Returns
HTMLElement
Source
type
gettype():string
Returns
string
Source
Methods
addProperty()
privateaddProperty(propertyName,propertyType,defaultValue,options):any
Registers an property with the specified type, name, and defaultValue.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
propertyName | string | undefined | |
propertyType | "string" | "bigint" | "object" | "map" | "file" | "view" | "blob" | "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 | |
defaultValue | any | null | |
options | null | object & IProperty | null |
Returns
any
Inherited from
See
Registered property gets added to properties. Returns default value, thus allowing to combine registering a property with the initialization
Source
apply()
apply(
properties):Widget<any>
Parameters
| Parameter | Type | Description |
|---|---|---|
properties | object |
Returns
Widget<any>
Inherited from
Source
applyFilter()
abstractapplyFilter():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
applyState()
applyState(
state):void
Override to load filter state.
Parameters
| Parameter | Type |
|---|---|
state | any |
Returns
void
Source
attach()
attach(
dataFrame):void
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
Source
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
Source
getDartProperties()
getDartProperties():
any[]
Returns
any[]
Inherited from
Source
getFunctions()
getFunctions():
Func[]
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
Source
getProperties()
getProperties():
Property[]
Returns all properties of this widget.
Returns
Property[]
Inherited from
Source
onFrameAttached()
onFrameAttached(
dataFrame):void
Parameters
| Parameter | Type |
|---|---|
dataFrame | DataFrame |
Returns
void
Inherited from
Source
onPropertyChanged()
onPropertyChanged(
property):void
Gets called when viewer's property is changed.
Parameters
| Parameter | Type | Description |
|---|---|---|
property | null | Property | or null, if multiple properties were changed. |
Returns
void
Inherited from
Source
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
saveState()
saveState():
any
Override to save filter state.
Returns
any
Source
sourceRowsChanged()
sourceRowsChanged():
void
Returns
void
Inherited from
Source
sub()
sub(
subscription):void
Registers a subscription to an external event.
Parameters
| Parameter | Type | Description |
|---|---|---|
subscription | Subscription |
Returns
void
Inherited from
Source
toDart()
toDart():
any
Returns
any
Inherited from
Source
find()
staticfind(root):null|Widget<any>
Finds existing widget from its visual root.
Parameters
| Parameter | Type |
|---|---|
root | Element |
Returns
null | Widget<any>
Inherited from
Source
fromRoot()
staticfromRoot(root):Widget<any>
Creates a new widget from the root element.
Parameters
| Parameter | Type |
|---|---|
root | HTMLElement |
Returns
Widget<any>
Inherited from
Source
getAll()
staticgetAll():Widget<any>[]
Returns all currently active widgets.
Returns
Widget<any>[]