Recently I came across a strange bug involving an expandable ListGrid.
I have attached a small TestCase that will reproduce the problem.
I was able to reproduce the problem using the latest nightly build for SmartGwt 5.0 (SmartClient Version: v10.0p_2015-05-20/LGPL Development Only (built 2015-05-20)).
The problem can be easily reproduced on Chrome and IE11. I haven't tried with other browsers, but it think that this is consistent.
Steps to reproduce:
1) Expand the ListGrid.
2) Resize (widen) a column in order to get a horizontal scroll-bar on the grid.
3) Scroll to the end of the grid. (So far everything is fine...). (see expected.PNG)
4) Widen more a column in order to get a bigger scroll-bar.
5) Now try scrolling to the end of the grid -> BUG -> It appears that the nested layout becomes unaware of its actual boundaries. (see bugged.PNG)
When the bug occurs (see the steps above to reproduce it), I can see the horizontal scroll-bar, but I am NOT able to scroll to the end. The grids becomes buggy and starts trembling. Another observation is that the nested layout gets shifted to the right and maybe this shifting is actually the problem. The nested component (layout) no longer starts from the expand icon, but instead it is shifted to the right (maybe a bogus magin-left applied (not sure)). (see shift.PNG)
When I expand a record I expect that the nested layout will span over the entire width of the grid (including the scroll depth).
P.S.
There are two notes I wish add:
1) When overriding getExpansionComponent(..) and the returned layout's width is set to setWidth100(), it doesn't auto-scale when a horizontal scroll-bar appears. It stays locked in the grid's viewport. This may or may not be related to the bug I've described, but still it's unexpected behavior.
2) I wasn't able to find a way to refresh (invalidate) a nested component, except collapsing and re-expanding it...
Environment:
Windows 7 64-bit, GWT 2.7, SmartGwt 5.0 (SmartClient Version: v10.0p_2015-05-20/LGPL Development Only (built 2015-05-20)), Chrome/IE
I have attached a small TestCase that will reproduce the problem.
I was able to reproduce the problem using the latest nightly build for SmartGwt 5.0 (SmartClient Version: v10.0p_2015-05-20/LGPL Development Only (built 2015-05-20)).
The problem can be easily reproduced on Chrome and IE11. I haven't tried with other browsers, but it think that this is consistent.
Steps to reproduce:
1) Expand the ListGrid.
2) Resize (widen) a column in order to get a horizontal scroll-bar on the grid.
3) Scroll to the end of the grid. (So far everything is fine...). (see expected.PNG)
4) Widen more a column in order to get a bigger scroll-bar.
5) Now try scrolling to the end of the grid -> BUG -> It appears that the nested layout becomes unaware of its actual boundaries. (see bugged.PNG)
When the bug occurs (see the steps above to reproduce it), I can see the horizontal scroll-bar, but I am NOT able to scroll to the end. The grids becomes buggy and starts trembling. Another observation is that the nested layout gets shifted to the right and maybe this shifting is actually the problem. The nested component (layout) no longer starts from the expand icon, but instead it is shifted to the right (maybe a bogus magin-left applied (not sure)). (see shift.PNG)
When I expand a record I expect that the nested layout will span over the entire width of the grid (including the scroll depth).
P.S.
There are two notes I wish add:
1) When overriding getExpansionComponent(..) and the returned layout's width is set to setWidth100(), it doesn't auto-scale when a horizontal scroll-bar appears. It stays locked in the grid's viewport. This may or may not be related to the bug I've described, but still it's unexpected behavior.
2) I wasn't able to find a way to refresh (invalidate) a nested component, except collapsing and re-expanding it...
Environment:
Windows 7 64-bit, GWT 2.7, SmartGwt 5.0 (SmartClient Version: v10.0p_2015-05-20/LGPL Development Only (built 2015-05-20)), Chrome/IE