Hybrid View
-
6 Mar 2013 10:33 AM #1
4.1.2a (& 4.1.1) Ext.grid.Panel & forceFit true breaks widths on first resize
4.1.2a (& 4.1.1) Ext.grid.Panel & forceFit true breaks widths on first resize
REQUIRED INFORMATION
Ext version tested:- Ext 4.1.2a, 4.1.1
- Chrome 25
- FF 19
- IE9
- When using a grid with forceFit to true after resizing the first column once the header and cell widths are no longer correct
http://jsbin.com/ivofav/2/edit
Test Case:
See http://jsbin.com/ivofav/2/edit
Operating System:- MAC OSX
- Win 7
- http://www.sencha.com/forum/showthread.php?238631 - closed as not enough info/can't reproduce
- http://www.sencha.com/forum/showthre...forceFit/page2 - still open but with no official acceptance of this as being a bug
- http://www.sencha.com/forum/showthread.php?244504 - Still open with official recognition of this as being a bug
- http://www.sencha.com/forum/showthread.php?238464 - Still open awaiting test case
- We don't want the grid scroll horizontally (hence the use of forceFit)
- We have four columns - one column of a fixed width, all the others should take up the remaining space equally (i.e. the equivalent of what flex does, though note I haven't used flex in the above examples)
- Our grid's width is going to be sized by a parent container's layout manager - I don't think this has any bearing on the bug above, but as it's a core requirement I've listed it here
-
6 Mar 2013 10:47 AM #2
After a little more playing I realise that the simple solution here is to NOT use forceFit (I don't know of any use cases for it now, so perhaps this could be changed to a bug about clearer documentation or deprecating it if it isn't needed).
Instead the correct solution that seems to work is just using flex: 1 on all the columns. So far this has helped achieve the behaviour we required, see http://jsbin.com/ivofav/4/edit for the working example
Again I think it's worth reviewing the docs around forceFit and listing the right use cases for this and highlighting that more often what people want to achieve should be done with "flex" on all the columns instead.
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote