kendo-labs / dlinq-helpers

Add server paging, filtering and sorting via Dynamic Linq
71 stars 70 forks source link

Filters added twice #32

Open chstorb opened 7 years ago

chstorb commented 7 years ago

The Filter.Collect method should be modified as follows:

` private void Collect(List filters) { if (Filters != null && Filters.Any()) { foreach (Filter filter in Filters) { filters.Add(filter);

                if (filter.Filters?.Count > 0) // add this line
                {                                         // add this line 
                    filter.Collect(filters);
                }                                         // add this line
            }
        }
        else
        {
            filters.Add(this);
        }
    }`