Hello Community,
I'm having a problem porting a SmartGwt application from version LGPL 4.1 (build 20170920) to version LGPL 6.1 (build 20170930).
I'm having a style issue with the summary row in a ListGrid in version 6.1 that was not present in version 4.1.
In a nutshell, I'm setting a summary row style with setSummaryRowStyle(); this style is defining an height and font-size because I need a smaller summary row.
In addition, but not required, I'm also setting the summary row height with setSummaryRowHeight().
What is happening is that the content of the summary row is indeed smaller, but the whole summary row is not getting smaller than 24px (no idea why this specific number). In version 4.1 the whole summary row was adapting to its smaller content.
In our real project, this ListGrid is aligned and has scrollbar synchronization with other widgets in the page, so this height issue is misaligning our data representation.
I prepared a small test example to visualize the issue.
This was the correct result using version 4.1. The summary row content (red) and the summary row itself have the same height.

While this is the incorrect result using version 6.1. Here the summary row content (red) has the correct dimensions, whilst the whole summary row cannot get that smaller, thus leaving an empty while space.

Thank you for any suggestions or feedback.
SummaryRowExample.java
SummaryRowExample.css
I'm having a problem porting a SmartGwt application from version LGPL 4.1 (build 20170920) to version LGPL 6.1 (build 20170930).
I'm having a style issue with the summary row in a ListGrid in version 6.1 that was not present in version 4.1.
In a nutshell, I'm setting a summary row style with setSummaryRowStyle(); this style is defining an height and font-size because I need a smaller summary row.
In addition, but not required, I'm also setting the summary row height with setSummaryRowHeight().
What is happening is that the content of the summary row is indeed smaller, but the whole summary row is not getting smaller than 24px (no idea why this specific number). In version 4.1 the whole summary row was adapting to its smaller content.
In our real project, this ListGrid is aligned and has scrollbar synchronization with other widgets in the page, so this height issue is misaligning our data representation.
I prepared a small test example to visualize the issue.
This was the correct result using version 4.1. The summary row content (red) and the summary row itself have the same height.
While this is the incorrect result using version 6.1. Here the summary row content (red) has the correct dimensions, whilst the whole summary row cannot get that smaller, thus leaving an empty while space.
Thank you for any suggestions or feedback.
SummaryRowExample.java
Code:
import com.google.gwt.core.client.EntryPoint; import com.smartgwt.client.types.ListGridComponent; import com.smartgwt.client.types.ListGridFieldType; import com.smartgwt.client.widgets.grid.ListGrid; import com.smartgwt.client.widgets.grid.ListGridField; import com.smartgwt.client.widgets.grid.ListGridRecord; public class SummaryRowExample implements EntryPoint { @Override public void onModuleLoad() { final ListGrid grid = new ListGrid(); grid.setShowGridSummary(true); grid.setSummaryRowHeight(15); grid.setSummaryRowStyle("summaryRowStyle"); grid.setWidth(300); grid.setHeight(300); ListGridField field1 = new ListGridField("field1", "FIELD 1"); field1.setType(ListGridFieldType.INTEGER); field1.setShowGridSummary(true); ListGridField field2 = new ListGridField("field2", "FIELD 2"); field2.setType(ListGridFieldType.INTEGER); field2.setShowGridSummary(true); ListGridField field3 = new ListGridField("field3", "FIELD 3"); field3.setType(ListGridFieldType.INTEGER); field3.setShowGridSummary(true); grid.setFields(field1, field2, field3); ListGridRecord record1 = new ListGridRecord(); record1.setAttribute("field1", 1); record1.setAttribute("field2", 2); record1.setAttribute("field3", 3); ListGridRecord record2 = new ListGridRecord(); record2.setAttribute("field1", 4); record2.setAttribute("field2", 5); record2.setAttribute("field3", 6); ListGridRecord record3 = new ListGridRecord(); record3.setAttribute("field1", 7); record3.setAttribute("field2", 8); record3.setAttribute("field3", 9); grid.setData(record1, record2, record3); Object[] components = new Object[] { ListGridComponent.SUMMARY_ROW, ListGridComponent.HEADER, ListGridComponent.BODY }; grid.setGridComponents(components); grid.draw(); } }
Code:
.summaryRowStyle { height: 15px; font-size: 10px; background-color: red; }
Comment