Print Friendly

Class Ext.tree.TreeFilter

Package:Ext.tree
Class:TreeFilter
Extends:Object
Defined In:TreeFilter.js
Note this class is experimental and doesn't update the indent (lines) or expand collapse icons of the nodes

Properties   -  Methods   -  Events

Public Properties

This class has no public properties.

Public Methods

Method Defined By
  clear() : void TreeFilter
Clears the current filter. Note: with the "remove" option set a filter cannot be cleared.
  filterString/RegExp value, [String attr], [TreeNode startNode] ) : void TreeFilter
Filter the data by a specific attribute.
  filterByFunction fn, [Object scope] ) : void TreeFilter
Filter by a function. The passed function will be called with each node in the tree (or from the startNode). If the f...

Public Events

This class has no public events.

Method Details

clear

public function clear()
Clears the current filter. Note: with the "remove" option set a filter cannot be cleared.
Parameters:
  • None.
Returns:
  • void
This method is defined by TreeFilter.

filter

public function filter( String/RegExp value, [String attr], [TreeNode startNode] )
Filter the data by a specific attribute.
Parameters:
  • value : String/RegExp
    Either string that the attribute value should start with or a RegExp to test against the attribute
  • attr : String
    (optional) The attribute passed in your node's attributes collection. Defaults to "text".
  • startNode : TreeNode
    (optional) The node to start the filter at.
Returns:
  • void
This method is defined by TreeFilter.

filterBy

public function filterBy( Function fn, [Object scope] )
Filter by a function. The passed function will be called with each node in the tree (or from the startNode). If the function returns true, the node is kept otherwise it is filtered. If a node is filtered, its children are also filtered.
Parameters:
  • fn : Function
    The filter function
  • scope : Object
    (optional) The scope of the function (defaults to the current node)
Returns:
  • void
This method is defined by TreeFilter.

Ext - Copyright © 2006-2007 Ext JS, LLC
All rights reserved.