1. #1
    Sencha User
    Join Date
    Oct 2013
    Posts
    19
    Vote Rating
    1
    a3366873 is on a distinguished road

      0  

    Default Ext.Menu store based list

    Ext.Menu store based list


    Hi,
    I'm new to Sencha Touch.
    I want to create menu sliding from the left side like in Kitchen Sink UI -> Menus (or facebook app) but I want to place Ext.dataview.List instead of buttons. I tried to modify Kitchen Sink but without success - my menu looks empty, what am I doing wrong?
    BTW it would be cool if you add Ext.Menu in docs and Architect.

    Code:
    Ext.define('MyApp.view.Menus', {
        extend: 'Ext.Container',
        alias: 'widget.menus',
    
        requires: [
            'Ext.Menu'
        ],
    
        config: {
            padding: 20,
            scrollable: true,
            defaults: {
                xtype: 'button',
                cls: 'demobtn',
                margin: '10 0'
            },
            items: [
                {
                    xtype: 'button',
                    handler: function(button, event) {
                        Ext.Viewport.toggleMenu('left');
                    },
                    text: 'Toggle left menu'
                }
            ]
        },
    
        doSetHidden: function(hidden) {
            this.callParent(arguments);
    
            if (hidden) {
                Ext.Viewport.removeMenu('left');
            } else {
                Ext.Viewport.setMenu(this.menuForSide('left'), {
                    side: 'left',
                    reveal: true
                });
            }
        },
    
        menuForSide: function(side) {
            var items = [{
                xtype: 'list',
                store: 'MenuItems',
                itemTpl: [
                '<div>{name}</div>'
                ]
            }];
    
            return Ext.create('Ext.Menu', {
                items: items
            });
    
        }
    
    });

  2. #2
    Sencha User
    Join Date
    Feb 2011
    Location
    Düsseldorf, Germany
    Posts
    574
    Vote Rating
    31
    Kurt001 has a spectacular aura about Kurt001 has a spectacular aura about

      1  

    Default


    add a height to the list.
    • Kurt001
    Code Review | Send PM


    Need to include a test case use:
    https://fiddle.sencha.com/#home

  3. #3
    Sencha User
    Join Date
    Oct 2013
    Posts
    19
    Vote Rating
    1
    a3366873 is on a distinguished road

      0  

    Default


    Thanks, after adding width and height my menu works as expected

Thread Participants: 1

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