Filter builder

OFilterBuilderComponent

Directive: o-filter-builder

Component hierarchy

  • o-filter-builder
    • o-filter-builder-menu

Inputs

Name Since Description Default

attr

string

Field identifier. Registry property if component is inside a form.

expression-builder

(values: Array<{ attr, value }>) => Expression

Funtion called for creating the expression. The function receives an array of objects that contains the target column attribute and the value of the respective form component and must return an instance of Expression. Read about how to build complex filter structures here.

filters

string

List of pairs of target component colums and form component attributes. Separated by ‘;’. Example: “targetColumn1:componentAttr1;targetColumn2:componentAttr2”.

query-on-change

yes | no | true | false

Indicates whether or not to trigger the target component refresh when a filter component change event is fired. You can define the change event in attribute query-on-change-event-type.

no

query-on-change-delay

number

Delay time in milliseconds query-on-change method is triggered.

0

query-on-change-event-type

onValueChange' | onChange

If query-on-change-event-type is onValueChange, the target component refresh when a filter component fired onValueChanged event else fired with the onChange event of angular

onValueChange

target

OServiceComponent

Component whose that will be filtered.

* required inputs.

Outputs

Name Since Description

onClear

Event triggered when the clear action is excuted

onFilter

Event triggered when the filter action is executed

Methods

clearFilter
Clears the form fields used by the filter builder to create the filter.
getBasicExpression
Returns an `IBasicExpression` object with the filter.
Returns
The `IBasicExpression` object with the filter.
getExpression
Returns an `Expression` object with the filter.
Returns
The `Expression` object with the filter.
getTargetComponent
Returns the filter builder target component.
Returns
The target component.
triggerReload
Trigger the `reloadData` method from the target component.

Directive: o-filter-builder-menu

Inputs

Name Since Description Default

icon

string

Name of google icon (see Google material design icons)

oFilterBuilder

oFilterBuilderComponent

Indicates which filter creator triggers the action

show-clear-option

[yes|no|true|false]

Indicates whether or not show clear option in the filter builder menu

yes

show-filter-option

[yes|no|true|false]

Indicates whether or not show filter option in the filter builder menu

yes

svg-icon

string

Name of svg icon

ontimize:more_vert