Docs
API
  • updateFilters()

    This method is for advanced filters usage. It helps to increase perfomance for complex filtering.
    It works in pair with waitingForFilters.

    Sometimes it needs to add filters on several data indexes(columns) but every adding filter will run update of grid,
    to avoid it you need set grid.waitingForFilters = true; and after adding filters run grid.updateFilters();

    Example: Multi filtering at a time

    
    var grid = new FancyGrid({
      ...
      filter: true,
      ...
    });
    
    ...
    grid.waitingForFilters = true;
    grid.addFilter('name', 'Nick');
    grid.addFilter('surname', 'Thomson');
    grid.updateFilters();// It will update grid and set waitingForFilters to false. 
    

    Example: Stop clearFilter

    
    var grid = new FancyGrid({
      ...
      filter: true,
      ...
    });
    
    ...
    //Some filtering
    ...
    grid.waitingForFilters = true;
    grid.clearFilter();//Clear all filters
    grid.addFilter('name', 'Nick');
    grid.updateFilters();// It will update grid and set waitingForFilters to false. 
    

    See also

    Method clearFilter
    Method find
    Method findItem
    Method getDataFiltered
    Method search

    Doc link Filtering