1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    27
    Answers
    2
    Vote Rating
    1
    English is on a distinguished road

      0  

    Default Unanswered: Filtering a Nested List

    Unanswered: Filtering a Nested List


    This should be a quick question: When filtering the store from which a nested list gets its data, should the nested list update automatically? I can't see any kind of refresh, or reload function.

    I'm simply filtering some JSON with the code below. I can see that the data is being filtered, but the nested list doesn't alter.

    Code:
                AllCoursesButton: {
                    tap: function(button){
                        if(button.getIconCls()=='docs2')
                        {
                            button.setIconCls('doc');
                            button.setText('Mobile Courses');
                            var ActiveStore=this.getCatalogList().getStore();
                            //debugger;
                            ActiveStore.filter('nametxt', 'Mobile Courses');
                            console.log(ActiveStore.getData().length);
                            //ActiveStore.load();
                        }
                        else
                        {
                            button.setIconCls('docs2');
                            button.setText('All Courses');
                            var ActiveStore=this.getCatalogList().getStore();
                            ActiveStore.clearFilter();
                            console.log(ActiveStore.getData().length);
                            //ActiveStore.load();
                        }
                    }
                }

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,791
    Answers
    3465
    Vote Rating
    833
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    The NestedList uses TreeStore but each child List uses a Node store so you can filter the Node store on the list for the node. It's not the simplest for the TreeStore.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Oct 2012
    Posts
    27
    Answers
    2
    Vote Rating
    1
    English is on a distinguished road

      0  

    Default


    Thanks, Mitchell. I'm not sure I understand your answer fully, but, I have just iterated through the node list for the nested list, and removed the items that I want to filter out.

    I have tested (by using "eachChild"), and the node is definitely gone. Yet, there it still sits in the nested list.

    It seems that nothing I do to either the nested list, or the underlying data, has any effect on the items displayed in the nested list once it has been displayed.

    As the documentation is woefully inadequate, I am at a loss. How does one in any way manipulate the items displayed in a nested list, once that list has been displayed?

  4. #4
    Sencha User
    Join Date
    Oct 2012
    Posts
    27
    Answers
    2
    Vote Rating
    1
    English is on a distinguished road

      1  

    Default


    Oh well. As Sencha provides no usable documentation, and I can find nothing on the Internet, I'm having to treat the nested list as a dumb component, and simply filtering at the back-end with a parameter to the AJAX call.

  5. #5
    Sencha User
    Join Date
    May 2013
    Posts
    37
    Answers
    3
    Vote Rating
    1
    kidmanmatch is on a distinguished road

      0  

    Default Filter function in nested list

    Filter function in nested list


    Am using a nested list, but didn't find out any option to filter the nested list. Can u please provide me an example about sorting nested list. Thanks in advance

Thread Participants: 2

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi