React 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.
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
value

String

|

Number

|

Date

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

valueText

String

The value with the format applied.

field

FilterBuilder Field

The field's configuration.

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<String>

Default Value: undefined
Accepted Values: 'string' | 'number' | 'date' | 'boolean' | 'object' | 'datetime'

Define this option 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 widget used to edit the field value.

Type:

template

Template Data:
Name Type Description
value

String

|

Number

|

Date

The editor's value.

field

FilterBuilder Field

The field's configuration.

setValue

Function

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

See Also

hasValue

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

Type:

Boolean

Default Value: true

icon

Specifies an icon that represents the operation. Accepts the name of an icon from the built-in icon library, a path to an image, or the CSS class of an icon stored in an external icon library.

Type:

String

Default Value: undefined

name

Specifies the operation's identifier.

Type:

String

Default Value: undefined