Results 1 to 4 of 4

Thread: ISSUE REGARDING Ux Accordion layout

  1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    25

    Default ISSUE REGARDING Ux Accordion layout

    For the Ux Accordion Layout in ST2,
    I am adding each item as LIST dynamically. But i am facing an issue, when the page is loaded all the items are shown in an expanded mode. but after i collapse all the items then it starts working proper..
    Can anyone help me out wid this issue..

    Thanks in advance

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,450
    Answers
    3997

    Default

    I threw that layout together in a couple hours so not everything may work and properly. It worked for my demo but the demo was very simple. You are free to change the code and submit PR
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Fullstack Engineer
    ________________
    Modus Create is based on the model of an open source team. We’re a remote, global team of experts in our field. To find out more about the work we do, head over to our website.

    Check out my GitHub:
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Jan 2013
    Posts
    1

    Default Accordion Layout(All items expanded by default)

    Hi i am new to sencha touch 2.I have all the items in my accordion layout expanded by default as i dont need anything to be expanded by default.Please give me solution as i am trying for the last two days.

  4. #4
    Sencha User
    Join Date
    Feb 2013
    Location
    Little Rock, AR, US
    Posts
    7

    Default

    If you were notified about my previous post to this thread, earlier today, please disregard. OK, Ux.layout.Accordion is indeed the one that works with recent versions of Touch. Where I confused myself was by first breaking the example in to discrete MVC parts then still expecting the code to work as it stood. Long story short, within the "view" to which this layout was applied, I added a painted listener and explicitly call this.layout.checkMode(this) from there. This provides a valid, scoped value for container within the layout code, and all is now working for me. I suspect this is not the cleanest way to do it, but maybe it will help.

    Here is my containing view:
    Code:
    Ext.define('MyApp.view.AccordionTest', {
        extend: 'Ext.Container',
        requires: [
    	    'Ext.dataview.List',
    	    'Ext.field.Text',
    	    'Ext.Toolbar',
    	    'Ext.ux.layout.Accordion'
        ],
        
        xtype: 'actestview',
        
        config: {
            id: 'actestHandle',
                    
    		fullscreen : true,
    		layout     : {
    			type :  "accordion",
    			toggleOnTitlebar: true,
    			mode: 'SINGLE'
    		},
    
    
            items      : [
                {
                    title : 'SUBD NAME',
                    items : {
                        xtype: 'panel',
                        html: "CONTENT"
                    }
                },
                {
                    title : 'SUBD NAME',
                    items : {
                        xtype: 'panel',
                        html: "CONTENT"
                    }
                },
                {
                    title : 'SUBD NAME',
                    items : {
                        xtype: 'panel',
                        html: "CONTENT"
                    }
                }
            ],
            listeners: {
    	        painted: function() {
    		        this.layout.checkMode(this);
    	        }
    	        
            }
    
    
    	}
    })

Posting Permissions

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