-
11 Feb 2013 11:05 AM #1
TableLayout wrong position of last item in row with colspan>1
TableLayout wrong position of last item in row with colspan>1
REQUIRED INFORMATION
Ext version tested:- Ext 4.1.3
- Chrome 20, 21, 24
- <!DOCTYPE html>
- Using a TableLayout with 2 columns. When there are (at least) 2 Items, the first with colspan=1 and the second with colspan=2, the second item is still displayed in the same row.
- see test case
- the second input item should be placed in the next row, because there are not enough columns left in the first row
Code:Ext.create('Ext.form.Panel', { title: 'Simple Form', width: 350, layout: { type:'table', columns:2 }, defaultType: 'textfield', items: [{ fieldLabel: 'First' },{ fieldLabel: 'Second', colspan:2 },{ fieldLabel: 'Third' }], renderTo: Ext.getBody() });
-
11 Feb 2013 12:47 PM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,118
- Vote Rating
- 453
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.
-
11 Feb 2013 2:21 PM #3
Thanks for quick answer.
I'm not saying, that there is something wrong with the generation of the markup per se.
For me it is just a logic error. If I specify an item should span over 2 columns, the layout should manage that exactly this is done. In this case it spans only 1 column visibly.
You pointed out, that behind the scenes the DOM-Node correctly spans 2 columns (the second and the third), but in fact there is no third column by definition. The Layout should not add more columns than specified (besides the case when colspan is higher than the column count).
If I specified 3 columns, the arrangement would at least in this case be correct (except for some differences in the sizing of the items).
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote