Filtering

Column Filters

LyteNyte Grid lets you filter data by applying filters to individual columns. Use the filterModel property on grid state to define which columns have filters applied.

The filter model is a key/value object:

  • Each key is a column id.
  • Each value is a filter configuration.

This section describes simple filters, available in both Core and PRO editions.
The PRO edition also supports:

Apply Column Filters

Set a filter in the filterModel to enable column-level filtering. Example:

const filterModel = {
  job: {
    kind: "text",
    operator: "contains",
    value: "tech",
  },
};

Text Filter

Use text filters for columns with string values. Operators include contains, begins_with, and others. Example: filter for rows where the job field contains "tech".

Text Filter

Number Filter

Apply number filters to numeric columns. Operators include less_than, greater_than, and equal. Example: filter out all rows with age < 30.

Number Filter

Date Filter

Use date filters for columns with date values. Operators include comparisons and date ranges, such as filtering for a specific quarter.

Example: filter rows where the date falls in Q2.

Date Filter

Combined Filter

Use a combined filter when multiple conditions need to be applied. A combination filter accepts an array of filters and evaluates them using either AND or OR. It supports short-circuit evaluation, stopping early if the outcome is already determined.

Example: filter for ages between 30 and 35.

Combined Filter

Function Filter

Function filters give you full control. Provide a custom predicate that returns true for rows to keep and false for rows to exclude.

Example: filter out all rows with odd age values.

Function Filter