Hybrid View
-
29 Jan 2013 12:48 PM #1
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
- Google Chrome Version 24.0.1312.52
- html
- 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.
- 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.
- Expect the nested list item to expand vertically to accommodate the contents.
- Past the first level of list items, the contents of the item "bleeds" outside of the nested list separator.
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.
- not provided
- only default ext-all.css
- Linux
- WinXP Pro
-
29 Jan 2013 1:34 PM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,624
- Vote Rating
- 434
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
________________
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.
-
29 Jan 2013 1:41 PM #3
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.
-
29 Jan 2013 2:04 PM #4
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.
-
30 Jan 2013 9:34 AM #5
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.
-
1 Feb 2013 5:36 PM #6
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):
The documentation wrongly states that this defaults to true. It doesn't. It defaults to false.Code:listConfig: { variableHeights: true }
Wait! Looks like we don't have enough information to add this to bug database. Please follow this template bug format.


Reply With Quote