resetFilter()
Description
Resets the active filters
Usage
resetFilter({
id?: string,
permanent?: boolean
}): boolean;
Parameters
config
- (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
- (optional) the id of the filter to resetpermanent
- (optional) true to reset all the active filters, including those that have thepermanent:true
setting in their config
Returns
The method returns true, if all the filters including the permanent ones have been reset; otherwise false
Example
const diagram = new dhx.Diagram("diagram_container", {
// configuration settings
});
diagram.data.parse(data);
// resets all the filters, except for those that have the "permanent" property in the config
diagram.data.resetFilter();
// resets all the filters, including those that have the "permanent" property in the config
diagram.data.resetFilter({ permanent: true });
// resets the filter with the specified id
diagram.data.resetFilter({ id: "filter_id" });
Change log: Added in v6.0