Hello,
Filtering list grid with expansion components seems to be broken in 3.1d version. Reproducible with following code.
By opening up the expansion labels on rows and using the filtering on data breaks up the grid. The expansion handles get "stuck", expansion components get lost some times. Error console also might get these:
To reproduce one symptom of the problem every time follow these steps:
1. expand rows 1 and 2 in grid so that the label is visible
2. enter "primarykey1" in pk field's filter and press enter
3. ... grid filters so that only row 1 is visible, the expansion handle is closed but still a stale expansion component is shown ?
Like said this is just one symptom. Other error situations are usually encountered when using the expansion components and filter toolbar simultaneously.
Tested with smartgwt 3.1d LGPL nightly 2012-08-21, Firefox 12.0, Mac OSX.
Filtering list grid with expansion components seems to be broken in 3.1d version. Reproducible with following code.
Code:
public void onModuleLoad() { // our viewport viewport = new VLayout(); viewport.setWidth100(); viewport.setHeight100(); final DataSource ds = new DataSource(); DataSourceTextField pk = new DataSourceTextField("pk"); pk.setPrimaryKey(true); DataSourceTextField text = new DataSourceTextField("text"); ds.setFields(pk, text); ds.setClientOnly(true); ds.setTestData(new Record[] { gr(1), gr(2), gr(3), gr(4), gr(5), gr(6), gr(7), gr(8) }); ListGrid grid = new ListGrid() { @Override protected Canvas getExpansionComponent(ListGridRecord record) { return new Label("This is a label"); } }; grid.setSize("400", "200"); grid.setCanExpandRecords(true); grid.setCanExpandMultipleRecords(true); grid.setDataFetchMode(FetchMode.LOCAL); grid.setShowFilterEditor(true); grid.setDataSource(ds); grid.setAutoFetchData(true); viewport.addMember(grid); viewport.draw(); } public ListGridRecord gr(int i) { ListGridRecord r = new ListGridRecord(); r.setAttribute("pk", "primarykey" + i); r.setAttribute("text", "text content for record " + i); return r; }
Code:
com.smartgwt.client.core.JsObject$SGWT_WARN: 13:45:54.173:MUP7:WARN:Log:TypeError: _1 is null Stack from error.stack: [a]MathFunction.isObserving(_1=>null, _2=>"resized") ...
1. expand rows 1 and 2 in grid so that the label is visible
2. enter "primarykey1" in pk field's filter and press enter
3. ... grid filters so that only row 1 is visible, the expansion handle is closed but still a stale expansion component is shown ?
Like said this is just one symptom. Other error situations are usually encountered when using the expansion components and filter toolbar simultaneously.
Tested with smartgwt 3.1d LGPL nightly 2012-08-21, Firefox 12.0, Mac OSX.
Comment