jQuery FilterBuilder - customOperations

Configures custom filter operations.

Default Value: []

calculateFilterExpression

Specifies a function that returns a filter expression for this custom operation.

Type:

Function

Function parameters:
filterValue: any

A FilterBuilder field's value.

The field's configuration.

Return Value:

Filter Expression

A filter expression with filter operations supported by the DataSource.
These operations are: "!", "=", "<>", ">", ">=", "<", "<=", "startswith", "endswith", "contains", "notcontains", "and", "or".

NOTE
The this keyword refers to the custom operation's configuration.

View Demo

See Also

caption

Specifies the operation's caption.

Type:

String

Default Value: undefined

customizeText

Customizes the field value's text representation.

Type:

Function

Function parameters:
fieldInfo:

Object

Information about a FilterBuilder field.

Object structure:
Name Type Description
field

FilterBuilder Field

The field's configuration.

value

String

|

Number

|

Date

The field's unformatted value (specified using the editor).

valueText

String

The value with the format applied.

Return Value:

String

The text to be displayed.

NOTE
The this keyword refers to the custom operation's configuration.

dataTypes

Specifies for which data types the operation is available by default.

Type:

Array<DataType>

Default Value: undefined

Define this property to make the custom operation available for all fields of specific data types. You can also make the operation available for an individual field by including the operation's name in the field's filterOperations array.

editorTemplate

Specifies a custom template for the UI component used to edit the field value.

Type:

template

Template Data:
Name Type Description
field

FilterBuilder Field

The field's configuration.

setValue

Function

A method you should call to change the field value after the editor value changes.

value

String

|

Number

|

Date

The editor's value.

hasValue

Specifies whether the operation can have a value. If it can, the editor is displayed.

Type:

Boolean

Default Value: true

icon

Specifies the icon that should represent the filter operation.

Type:

String

Default Value: undefined

This property accepts one of the following:

name

Specifies the operation's identifier.

Type:

String

Default Value: undefined