new Filter(name, query, columns, space, connectors, ignoreCase, hidden) → {FooTable.Filter}
The filter object contains the query to filter by and the columns to apply it to.
Parameters:
Name | Type | Argument | Default | Description |
---|---|---|---|---|
name |
string | The name for the filter. | ||
query |
string | FooTable.Query | The query for the filter. | ||
columns |
Array.<FooTable.Column> | The columns to apply the query to. | ||
space |
string |
<optional> |
"AND" | How the query treats space chars. |
connectors |
boolean |
<optional> |
true | Whether or not to replace phrase connectors (+.-_) with spaces. |
ignoreCase |
boolean |
<optional> |
true | Whether or not ignore case when matching. |
hidden |
boolean |
<optional> |
true | Whether or not this is a hidden filter. |
Returns:
- Type
- FooTable.Filter
Extends
Members
-
columns :Array.<FooTable.Column>
-
The columns to apply the query to.
Type:
- Array.<FooTable.Column>
-
connectors :boolean
-
Whether or not to replace phrase connectors (+.-_) with spaces before executing the query.
Type:
- boolean
-
Whether or not this is a hidden filter.
Type:
- boolean
-
ignoreCase :boolean
-
Whether or not ignore case when matching.
Type:
- boolean
-
name :string
-
The name of the filter.
Type:
- string
-
query :string|FooTable.Query
-
The query for the filter.
Type:
- string | FooTable.Query
-
space :string
-
A string specifying how the filter treats space characters. Can be either "OR" or "AND".
Type:
- string
Methods
-
match(str) → {boolean}
-
Checks if the current filter matches the supplied string. If the current query property is a string it will be auto converted to a FooTable.Query object to perform the match.
Parameters:
Name Type Description str
string The string to check. Returns:
- Type
- boolean
-
matchRow(row) → {boolean}
-
Checks if the current filter matches the supplied FooTable.Row.
Parameters:
Name Type Description row
FooTable.Row The row to check. Returns:
- Type
- boolean