Skip to main content

resetFilter()

resets the active filters

resetFilter(config?: object, silent?: boolean): boolean;

Parameters:

  • config?: object - optional, specifies the parameters of resetting the active filters. If the config isn't specified or it is empty, all the filters except for those that have the permanent property in the configuration object will be reset. Can contain the following properties:
    • id?: string - optional, the id of the filter to reset
    • permanent?: boolean - optional, true to reset all the active filters, including those that have the permanent:true property in their config
  • silent?: boolean - optional, if set to true, the method will be called without triggering events, false by default
info

Note that after calling the method with the silent:true parameter, you may need to repaint the component with the paint() method.

Returns:

  • result: boolean - true, if all the filters, including the permanent ones, have been reset; otherwise false

Example

// resets all the filters, except for those that have the "permanent" property in the config
component.data.resetFilter();

// resets all the filters, including those that have the "permanent" property in the config
component.data.resetFilter({ permanent: true });

// resets the filter with the specified id
component.data.resetFilter({ id: "filter_id" });