Skip to main content

beforeFilter

fires before the filterChange event is called

beforeFilter:({ value: string, colId?: string | number }) => void | boolean;

Parameters:

The callback of the event is called with the following parameters:

  • value: string - required, the entered value by which data must be filtered
  • colId: string | number - optional, the ID of a column

Returns:

Return false to block the filtering process; otherwise, true.

Example

treegrid.events.on("beforeFilter", (value, colId) => {
console.log("The", colId, "column is filtered by", value, "value");
// return false;
});

Change log:

added in v8.0