Menu
Download Free Trial
Table of contents

clearFilter

clearFilter(hierarchyName:String)

[starting from version: 1.4]

Clears the filter which was applied previously to the specified hierarchy.

Parameters

  • hierarchyName – the name of the hierarchy.

Example

var filter = [
    "category.[cars]", 
    "category.[bikes]" 
];
flexmonster.setFilter('Category', filter);
flexmonster.getFilter('Category');

/*
method getFilter() returns the following Array
[
  {'caption' : 'Cars', 'hierarchyName' : 'Category', 'uniqueName' : 'category.[cars]'},
  {'caption' : 'Bikes', 'hierarchyName' : 'Category', 'uniqueName' : 'category.[bikes]'}
]
*/

flexmonster.getFilterProperties('Category');
/*
method getFilterProperties() returns the following object, where type is 'members' and members property has 2 elements
{
  type : 'members',
  members : [
   {'caption' : 'Cars', 'uniqueName' : 'category.[cars]'},
   {'caption' : 'Bikes', 'uniqueName' : 'category.[bikes]'}
  ]
}
*/

flexmonster.clearFilter('Category');

flexmonster.getFilter('Category');
/*
after clearFilter() call method getFilter() returns an empty Array
[]
*/

flexmonster.getFilterProperties('Category');
/*
after clearFilter() call method getFilterProperties() returns an Object with type 'none' and empty members array
{
  type : 'none',
  members : []
}
*/

Open the example on JSFiddle.

See also

getFilter
getFilterProperties
setFilter
setTopX
setBottomX