NobsterTheLobster / Xamarin.Forms.GridView

GridView for xamarin forms
MIT License
60 stars 10 forks source link

[Android]: theoretical problem in PrepareGrouping() #22

Closed deakjahn closed 6 years ago

deakjahn commented 6 years ago

In PrepareGrouping(), you look for a potentially nested items source (ie. grouping required by the user) by checking whether it has IEnumerable elements. But there is a standard type that's not really a list but is still IEnumerable: string. If the source is a list of strings, it will be mistaken for a nested list. So:

    //Get the groups within the items source.
    var groups = _items.OfType<IEnumerable>().Where(grp => !(grp is string));
NobsterTheLobster commented 6 years ago

New version