-
23 Oct 2012 2:30 AM #1
minHeight on table header causes layout faults if there is a scrollbar
minHeight on table header causes layout faults if there is a scrollbar
To reproduce, run this:
Note that the layout error only appears if there is a scrollbar in the grid view, or so it seems. If you delete a couple of data rows, so that all the remaining fit in the view, layout works without problems.Code:Ext.onReady (function () { Ext.widget ('grid', { store: { type: 'array', fields: ['text'], data: [['xxx'], ['zzz'], ['zzz'], ['zzz'], ['zzz'], ['zzz'], ['zzz'], ['xxx']] }, columns: { minHeight: 50, items: [{ text: 'lalala', dataIndex: 'text' }] }, height: 200, renderTo: document.body }); });
Also 'height' instead of 'minHeight' is a possible workaround, but it certainly doesn't have the same semantics and I need *minimum* height (it depends on size of another component).
-
23 Oct 2012 5:22 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,085
- 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.
-
23 Oct 2012 6:18 AM #3
Here is what I see, Google Chrome 22.0. The header is 50 px, but it is empty (no text, no background), and there is "Layout run failed" error in the console. Depending on font size you may need to add a couple of lines in the grid so that scrollbar appears.
grid-header.png
-
23 Oct 2012 6:22 AM #4Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,085
- 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.
-
23 Oct 2012 7:22 AM #5
I tested it with 4.1.2a (latest released version, as I understand) and also the nightly build from 22.10.2012. In both cases I can reproduce my error. But, cannot reproduce if I just run the code on e.g. Ext example pages on Sencha website...
So, can you please test with this HTML page? It is self-contained except you may need to alter the two Ext CSS and JS paths.
Code:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <link rel="stylesheet" href="ext-all.css" type="text/css"/> <script type="text/javascript" src="ext-all-dev.js"></script> <script type="text/javascript"> Ext.onReady (function () { Ext.widget ('grid', { store: { type: 'array', fields: ['text'], data: [['xxx'], ['zzz'], ['zzz'], ['zzz'], ['zzz'], ['zzz'], ['zzz'], ['xxx']] }, columns: { minHeight: 50, items: [{ text: 'lalala', dataIndex: 'text' }] }, height: 200, renderTo: document.body }); }); </script> </head> <body></body> </html>
Success! Looks like we've fixed this one. According to our records the fix was applied for
EXTJSIV-7582
in
4.2.0.265.


Reply With Quote