I’m using the pagination add-on so Vaadin 8’s default grid sorter only works on the first page. No problem, I’m using custom comparators inside the sort listener.
However, the default grid sorting is still occurring so it reconfigures the rows just prior to my sorting implementation doing the same, so it occurs twice. My Collection sort
order is correct but when I set the rows into the grid they’re in a different order. I’m attributing this to the undesired default sorting behaviour. How do I ignore this?
I’ve tried to @Override all public sort methods inside Grid as per the [answer here]
(https://stackoverflow.com/a/32969630) but none of them are firing when I click the Grid’s header.
Please help.
public class MyGrid extends Grid<MyRow> {
private final List<MyRow> rows = new ArrayList<>();
@Override
public void sort(String columnId) {
System.out.println("not firing");
}
@Override
public void sort(String columnId, SortDirection direction) {
System.out.println("not firing");
}
@Override
public void sort(Grid.Column column) {
System.out.println("not firing");
}
@Override
public void sort(Grid.Column column, SortDirection direction) {
System.out.println("not firing");
}
}