Results 1 to 3 of 3

Thread: TreePanel with "rootVisible: false" not showing anything in Ext 4.2

    Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha Premium Member VDP's Avatar
    Join Date
    Feb 2012
    Location
    Boom, Belgium
    Posts
    90
    Vote Rating
    11
      0  

    Default TreePanel with "rootVisible: false" not showing anything in Ext 4.2

    REQUIRED INFORMATION

    Ext version tested:
    • Ext 4.2.0
    Browser versions tested against:
    • Chrome Version 25.0.1364.172 m
    Description:
    I can't get the treepanel working in the new Ext 4.2.0 version. Specifically when I don't want the root to be visible. I provide 2 test cases.

    Steps to reproduce the problem:
    • define, create and load an 'Ext.data.TreeStore',
    • create a treepanel with the rootVisible set to false.
    The result that was expected:
    • list of folders (optionally leafs, but not in my test data)
    The result that occurs instead:
    • no list empty, 0 height panel showing.

    Test Case:

    working Ext 4.1.1 example:
    http://jsfiddle.net/Vandeplas/y9WhL/12

    broken Ext 4.2.0 example:
    http://jsfiddle.net/Vandeplas/y9WhL/16/

    HELPFUL INFORMATION

    See this URL for live test case:http://jsfiddle.net/Vandeplas/y9WhL/16/

    Additional CSS used:
    • only default ext-all-debug.css
    Operating System:
    • Windows 7 - 64Bit

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,553
    Vote Rating
    1272
      0  

    Default

    It looks like it's the leaf field that you have in your model.
    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

  3. #3
    Sencha Premium Member VDP's Avatar
    Join Date
    Feb 2012
    Location
    Boom, Belgium
    Posts
    90
    Vote Rating
    11
      0  

    Default

    Thanks for putting me on the right track!

    The issue was indeed with the converter on the leaf field. Behind the scenes Ext creates a root node if no root node is present. In previous versions the newly created root node wasn't passed through the converter in Ext 4.2 it is past through the converter. In my case I checked if type is 'folder'. But the root field has no type resulting in being a leaf. Resulting in not showing anything. (because the root was hidden)

    working fiddle with logging

    http://jsfiddle.net/Vandeplas/y9WhL/19/



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
  •