Class: Filter

FooTable.Filter

new Filter(name, query, columns, spaceopt, connectorsopt) → {FooTable.Filter}

The filter object contains the query to filter by and the columns to apply it to.
Parameters:
Name Type Attributes Default Description
name string The name for the filter.
query string 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.
Returns:
Type
FooTable.Filter

Extends

Members

columns :Array.<FooTable.Column>

The columns to apply the query to.
Type:

connectors :boolean

Whether or not to replace phrase connectors (+.-_) with spaces before executing the query.
Type:
  • boolean

name :string

The name of the filter.
Type:
  • string

query :string|FooTable.Query

The query for the filter.
Type:

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