Wait! Looks like we don't have enough information to add this to bug database. Please follow this template bug format.
  1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    27
    Vote Rating
    1
    English is on a distinguished road

      0  

    Default Nested List Item Not Expanding to Fit Contents

    Nested List Item Not Expanding to Fit Contents


    REQUIRED INFORMATION

    Ext version tested:
    • Sencha Touch. 2.1.0
    Browser versions tested against:
    • Google Chrome Version 24.0.1312.52
    DOCTYPE tested against:
    • html
    Description:
    • When using the nested list component, if the contents of an item consists of more than a couple of lines, the nested list does not expand to fit the contents. The contents "bleeds" over the item separators.
    Steps to reproduce the problem:
    • Edit the "Kitchen Sink" example code, and add a getItemTextTpl which contains some "<br>" items to make it span more than a couple of lines.
    The result that was expected:
    • Expect the nested list item to expand vertically to accommodate the contents.
    The result that occurs instead:
    • Past the first level of list items, the contents of the item "bleeds" outside of the nested list separator.
    Test Case:


    Code:
    /**
     * Demonstrates a NestedList, which uses a TreeStore to drill down through hierarchical data
     */
    Ext.require('Ext.data.TreeStore', function() {
        Ext.define('Kitchensink.view.NestedList', {
            requires: ['Kitchensink.view.EditorPanel', 'Kitchensink.model.Cars', 'Ext.layout.Fit'],
            extend: 'Ext.Container',
            config: {
                layout: 'fit',
                items: [{
                    xtype: 'nestedlist',
                    store: {
                        type: 'tree',
                        id: 'NestedListStore',
                        model: 'Kitchensink.model.Cars',
                        root: {},
                        proxy: {
                            type: 'ajax',
                            url: 'carregions.json'
                        }
                    },
                    //This is the line that is added.
                    getItemTextTpl: function() {
                                return '{text}<br>Second test line<br>Third test line<br>Fourth test line<br>Fifth test line';
                        },
                    displayField: 'text',
                    listeners: {
                        leafitemtap: function(me, list, index, item) {
                            var editorPanel = Ext.getCmp('editorPanel') || new Kitchensink.view.EditorPanel();
                            editorPanel.setRecord(list.getStore().getAt(index));
                            if (!editorPanel.getParent()) {
                                Ext.Viewport.add(editorPanel);
                            }
                            editorPanel.show();
                        }
                    }
                }]
            },
        });
    });





    HELPFUL INFORMATION

    Screenshot or Video:

    NestedListProblem2.png
    See this URL for live test case: http://

    Debugging already done:
    • Reproduced this outside of our existing code to eliminate any potential impacts of our code and stylesheet.
    Possible fix:
    • not provided
    Additional CSS used:
    • only default ext-all.css
    Operating System:
    • Linux
    • WinXP Pro

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

      -1  

    Default


    Can I get a full test case? The test you have given is only part of it. Also, it's not done in the best way and also is overnesting.
    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.

  3. #3
    Sencha User
    Join Date
    Oct 2012
    Posts
    27
    Vote Rating
    1
    English is on a distinguished road

      0  

    Default


    I don't understand. I've added one line to the Kitchen sink example. Is that what made it "overnesting"?

    To reproduce, you add that one line to the kitchen sink example.

  4. #4
    Sencha User
    Join Date
    Oct 2012
    Posts
    27
    Vote Rating
    1
    English is on a distinguished road

      0  

    Default


    Well, just like the Sencha documentation, your answer was brief, and contained little useful information.


    Can you tell me what more you need than adding ONE line to the kitchen sink example? I fail to see how it could be simpler.

  5. #5
    Sencha User
    Join Date
    Dec 2010
    Posts
    69
    Vote Rating
    0
    irocker is on a distinguished road

      0  

    Default


    I am having the same problem. I too am able to reproduce it with the Kitchen Sink app, after trying the example English posted.

    Is there any fix or workaround for this? Please advise, this is kind of a show stopper for our app.

  6. #6
    Sencha User
    Join Date
    Oct 2012
    Posts
    27
    Vote Rating
    1
    English is on a distinguished road

      0  

    Default


    For the sake of other people coming across this issue, we have found the answer.

    It has been addressed in this bug report (which wasn't summarily and cryptically dismissed):
    http://www.sencha.com/forum/showthread.php?248999

    You have to add this to the nested list (or list):
    Code:
    listConfig: {
       variableHeights: true
    }
    The documentation wrongly states that this defaults to true. It doesn't. It defaults to false.

Thread Participants: 2

Tags for this Thread

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