GroupedObservableCollection icon indicating copy to clipboard operation
GroupedObservableCollection copied to clipboard

Not an issue but a suggestion

Open TyJOrtiz opened this issue 1 year ago • 0 comments

Hi,

I ran across your repo and it's been helpful with a project I'm working on. I noticed in your readme that one of the limitations is that it only works in ascending order.

I played around with it and my suggestion is to maybe find a way to set whether the Collection is in Ascending or Descending order

var match = SortDirection == SortDirection.Ascending ? this.Select((group, index) => new { group, index }).FirstOrDefault(i => i.group.Key.CompareTo(key) >= 0) : this.Select((group, index) => new { group, index }).FirstOrDefault(i => i.group.Key.CompareTo(key) <= 0);

i.group.Key.CompareTo(key) >= 0 for Ascending and i.group.Key.CompareTo(key) <= 0 for Descending.

TyJOrtiz avatar Jan 08 '24 05:01 TyJOrtiz