1. #1
    Sencha User
    Join Date
    May 2012
    Location
    Bangalore
    Posts
    95
    Vote Rating
    1
    Rameshlamani is on a distinguished road

      0  

    Default After store filter expand and collapse is not showing child data in AccordionList?

    After store filter expand and collapse is not showing child data in AccordionList?


    I have implemented accordion list by referring this link. http://docs.kawanoshinobu.com/touch/....AccordionList . Accordion is working fine without any issues. I need to search text only on accordion list headers. After search, Once if got accordion headers. Should be, i able to expand and collapse those headers need to see the header child items. I have applied store filter, it is filtered store and displayed filtered data (refer image). expand and collapse is happening on header right and down icon is changing. but not able to see the child nodes data of particular header on expand mode. child nodes are available of that header(seen in console.log()). Is there any other way to apply filter for accordion list/tree store? Great appreciate. Thank you. in above link itself i have applied store filter it's behaviors same as what i am facing issue on my code. In below code i passing filter text 'to'. it is filtered today, very nice. but when click on expand child nodes are not visible.

    BeforeFilter.png

    AfterFilter.png

    code is here:


    Code:
    var data = {
            "items" : [{
                  "text" : "Today",
                  "items" : [{
                              "text" : "Eat",
                              "leaf" : true
                          }, {
                              "text" : "Sleep",
                              "leaf" : true
                          }, {
                              "text" : "Drinking",
                              "leaf" : true
                          }]
              }, {
                  "text" : "Tomorrow",
                  "items" : [{
                              "text" : "Watch TV",
                              "leaf" : true
                          }, {
                              "text" : "Watch Video",
                              "leaf" : true
                          }]
              }, {
                  "text" : "This week",
                  "items" : [{
                              "text" : "Shopping",
                              "leaf" : true
                          }]
              }, {
                  "text" : "Later",
                  "items" : [{
                              "text" : "Eat",
                              "leaf" : true
                          }, {
                              "text" : "Sleep",
                              "leaf" : true
                          }, {
                              "text" : "Drinking",
                              "leaf" : true
                          }]
              }]
         };
        
         Ext.define('Task', {
             extend: 'Ext.data.Model',
             config: {
                 fields: [{
                     name: 'text',
                     type: 'string'
                 }]
             }
         });
        
         var store = Ext.create('Ext.data.TreeStore', {
             model: 'Task',
             defaultRootProperty: 'items',
             root: data
         });    
        
    
    
        store.filter([{
                            property: "text",
                            value: "to",
                            anyMatch: true               
                        }]);
    
    
        
         var accordionList = Ext.create('Ext.ux.AccordionList', {
             fullscreen: true,
             store: store
         });

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,633
    Vote Rating
    817
    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


    It may be best to reach out directly to the extension author.
    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.