[dojo-contributors] Dojo.data + filter of nest structures

Karl Tiedt ktiedt at gmail.com
Tue Mar 8 16:43:52 EST 2011


In our current project we came across a problem with Tree like
structured data and filtering and wanted to start a thread to see if
maybe its an oversight that needs correcting or maybe a buried set of
flags that needs documenting.

Use case: LazyTreeGrid (what we use) but could be applied to TreeGrid
or Tree as well we figure (not able to test these at this time) +
wanting to show proper grid structure to display the filtered results:

Example:
Toplevel-1
     Toplevel-1-SecondLevel-1
             Toplevel-1-secondLevel-1-ThirdLevel-1
             Toplevel-1-secondLevel-1-ThirdLevel-2
             Toplevel-1-secondLevel-1-ThirdLevel-3

Now if we say the above text is the name of each item, then filter on
ThirdLevel-3 it *should* return:

Toplevel-1
     Toplevel-1-SecondLevel-1
             Toplevel-1-secondLevel-1-ThirdLevel-3

However, currently the entire childrens array is displayed... a
possible solution would be to filter with deep=true, however this
returned a flattened result set from what we saw

So my questions:

1) Did we miss something when we went through the options/code that
does handle this properly?

2) If #1 is no, should this be a function of the DataStore (returning
the proper data structure) or should it be on the LazyTreeGrid/Tree to
understand deep=true and build its structure correctly from there?


-Karl Tiedt


More information about the dojo-contributors mailing list