How to filtered items in Vaadin grid?

Hi,

I want to get list of filtered items in vaadin grid. I can do it in Vaaidn 8, but I can’t Vaadin 13 or 14. Is there a workaround way for this?

thank you.

My issue is very similiar with that: https://vaadin.com/forum/thread/17469747/getting-the-filtered-rows-in-a-grid

I also tried this way but I think it’s not useful for performance…

Label itemSize = new Label(invoiceDataProvider.getItems().size() + "");
invoiceGrid.appendFooterRow().getCell(invoiceGrid.getColumns().get(0)).setComponent(itemSize);

invoiceGrid.getDataProvider().addDataProviderListener(e -> {
    int size = invoiceGrid.getDataProvider().withConfigurableFilter().fetch(new Query<>()).collect(Collectors.toList()).size();
    itemSize.setText(String.valueOf(size));
});

The easy method for this is on a wish list, so go and give your thumbs up and comments in the ticket here https://github.com/vaadin/flow/issues/4510