Shabeer
Shabeer

Reputation: 23

List not showing inside a child container sencha touch 2?

hi i am creating a list inside a child container not showing , but add other component inside a child container it shows my view is

Ext.define('senchatest.view.First', {
extend: 'Ext.Container',
xtype:'first',
requires: [
    'Ext.MessageBox',
    'senchatest.model.Contact'
],
config: {
    layout: Ext.os.deviceType == 'Phone' ? 'fit' : {
        type: 'hbox',
        align: 'center',
        pack: 'center'
    },
    cls: 'demo-list',

    items: [{
        height: Ext.os.deviceType == 'Phone' ? null : '80%',
        flex: 1,
        id: 'masterlist',
        xtype: 'list',
        store: 'List',
        // grouped: true,
        itemTpl: '{firstName} {lastName}'
    },
        {

                     flex : 1,
                    id: 'closetCodeContainer',
                    xtype: 'container',
                    type: 'hbox',
                    layout: 'fit',
                    align: 'center',
                    // align: 'center',
           items:[{
                    height: '80',
                    id: 'customerList',
                    xtype: 'list',
                    store: 'List',
                    grouped: true,
                    itemTpl: '{lastName} {firstName}'
                }]

        }],

masterlist list is showing but customer list not showing thank you

Upvotes: 1

Views: 758

Answers (1)

sabeer
sabeer

Reputation: 603

just add height in child container and list

                id: 'closetCodeContainer',
                xtype: 'container',
                type: 'hbox',
                layout: 'fit',
                height: '100px'
                align: 'center',
       items:[{
                height: '100px',
                id: 'customerList',
                xtype: 'list',
                store: 'List',
                grouped: true,
                itemTpl: '{lastName} {firstName}'
            }]

Upvotes: 1

Related Questions