Results 1 to 2 of 2

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

  1. #1
    Sencha User
    Join Date
    May 2012
    Location
    Bangalore
    Posts
    95
    Vote Rating
    1
      0  

    Default 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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Vote Rating
    1272
      0  

    Default

    It may be best to reach out directly to the extension author.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

Tags for this Thread

Posting Permissions

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