Viritin MGrid FilterableListContainer IndexOutOfBoundsException

Hi Matti,

I am using MGrid for lazyloading which works fine. I use FilterableListContainer to support my FilterBar which works perfectly well on normal Grids. Somehow I am getting following error on moving to MGrid

Jan 26, 2017 12:05:13 AM com.vaadin.server.DefaultErrorHandler doDefault
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    at java.util.ArrayList.rangeCheck(
    at java.util.ArrayList.get(
    at java.util.Collections$UnmodifiableList.get(
    at org.vaadin.viritin.LazyList.get(
    at org.vaadin.viritin.LazyList$
    at org.vaadin.viritin.FilterableListContainer.applyFilters(
    at org.vaadin.viritin.FilterableListContainer.filterContainer(
    at org.vaadin.viritin.FilterableListContainer.addFilter(
    at org.vaadin.viritin.FilterableListContainer.addContainerFilter(

Could you please tell me how to fix it?

This is my pretty standard lazyloadingfrom function

getGrid().lazyLoadFrom(new SortablePagingProvider() {

        private static final long serialVersionUID = 1L;

        public List<AggrFoodList> findEntities(int firstRow, boolean sortAscending, String properties) {
            return  aggrFoodListRepos.findAll(new PageRequest(firstRow, PAGESIZE, sortAscending ? Sort.Direction.ASC : Sort.Direction.DESC, properties == null ? "id" : properties)).getContent();

    }, new CountProvider() {

        private static final long serialVersionUID = 1L;

        public int size() {
            return (int)aggrFoodListRepos.count();
    }, PAGESIZE);