How to filtered items in Vaadin grid?


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:

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

Label itemSize = new Label(invoiceDataProvider.getItems().size() + "");

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

The easy method for this is on a wish list, so go and give your thumbs up and comments in the ticket here