Results 1 to 2 of 2

Thread: Tree store flitering

  1. #1
    Sencha Premium User
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    2,425
    Answers
    20

    Default Answered: Tree store flitering

    This not a bug in the code, but the What's New document doesn't mention that tree stores can now be filtered. There's a brief mention of heterogenous tree nodes, but the filtering feature is not mentioned, and it's a really nice feature.

  2. There is an example in the Kitchen Sink: http://dev.sencha.com/ext/5.0.0/exam...#filtered-tree

    As you can see, it's a little more complicated in the illustrated case than flat store filtering.

    Because if a child node passes the filter and wants to be visible, that forces all ancestors to be visible regardless of whether they themselves pass the filter test.

    If that doesn't concern you, and the filter will return correct hide/show values for all nodes and can turf parent nodes out regardless of descendants, then you can use a simple filter.

    The huge change here is that a TreeStore is just a Store now.

    It is the store which drives the view on a one-to-one basis.

    There's no Tree->TreeStore->NodeStore transformation and communication going on.

    It's simpler and more efficient.

  3. #2
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,892
    Answers
    41

    Default

    There is an example in the Kitchen Sink: http://dev.sencha.com/ext/5.0.0/exam...#filtered-tree

    As you can see, it's a little more complicated in the illustrated case than flat store filtering.

    Because if a child node passes the filter and wants to be visible, that forces all ancestors to be visible regardless of whether they themselves pass the filter test.

    If that doesn't concern you, and the filter will return correct hide/show values for all nodes and can turf parent nodes out regardless of descendants, then you can use a simple filter.

    The huge change here is that a TreeStore is just a Store now.

    It is the store which drives the view on a one-to-one basis.

    There's no Tree->TreeStore->NodeStore transformation and communication going on.

    It's simpler and more efficient.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •