FlowingCode / TwinColGridAddon

TwinColGrid Vaadin Add-on
https://www.flowingcode.com/en/open-source/
Apache License 2.0
7 stars 7 forks source link

(Version 3) Filters are not visible #123

Closed javier-godoy closed 1 year ago

javier-godoy commented 1 year ago

When using the pre-alpha version 3.0.0, filterable columns do not display the filter components: image

This happens because the additional header row is appended before calling setHeader. If there are no existing header rows, appendHeaderRow creates the first row, which is also the defaultHeaderRow used by setHeader

Grid<Integer> grid = new Grid<>();
var col = grid.addColumn(x -> x);
HeaderRow header = grid.appendHeaderRow();
header.getCell(col).setText("FILTER");
col1.setHeader("HEADER");

image

In version 2, each call to addColumn was immediately followed by setHeader (because all the methods that created a column received header as a parameter). Particularly, addFilterableColumn used to set the header before creating the additional header row.

javier-godoy commented 1 year ago

Closed by PR in branch v3.0.0.