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
SEVERE: 
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    at java.util.ArrayList.rangeCheck(ArrayList.java:653)
    at java.util.ArrayList.get(ArrayList.java:429)
    at java.util.Collections$UnmodifiableList.get(Collections.java:1309)
    at org.vaadin.viritin.LazyList.get(LazyList.java:209)
    at org.vaadin.viritin.LazyList$1.next(LazyList.java:312)
    at org.vaadin.viritin.FilterableListContainer.applyFilters(FilterableListContainer.java:79)
    at org.vaadin.viritin.FilterableListContainer.filterContainer(FilterableListContainer.java:72)
    at org.vaadin.viritin.FilterableListContainer.addFilter(FilterableListContainer.java:50)
    at org.vaadin.viritin.FilterableListContainer.addContainerFilter(FilterableListContainer.java:173)
    at com.aahar.ui.design.grid.filter.FilterComponent.filterListner(FilterComponent.java:130)

Could you please tell me how to fix it?

This is my pretty standard lazyloadingfrom function

[code]
getGrid().lazyLoadFrom(new SortablePagingProvider() {

        private static final long serialVersionUID = 1L;

        @Override
        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;

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

[/code]thanks
Chahat