-
18 Mar 2013 8:32 AM #1
TreePanel with "rootVisible: false" not showing anything in Ext 4.2
TreePanel with "rootVisible: false" not showing anything in Ext 4.2
REQUIRED INFORMATION
Ext version tested:- Ext 4.2.0
- Chrome Version 25.0.1364.172 m
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.
- list of folders (optionally leafs, but not in my test data)
- 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
- Windows 7 - 64Bit
-
18 Mar 2013 1:01 PM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,656
- Vote Rating
- 435
It looks like it's the leaf field that you have in your model.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
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 almost in print!
When posting code, please use BBCode's CODE tags.
-
19 Mar 2013 12:32 AM #3
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/
Looks like we can't reproduce the issue or there's a problem in the test case provided.


Reply With Quote