Skip to content

Commit

Permalink
Added in check for AnyUncheckedItems()
Browse files Browse the repository at this point in the history
As this optimises the case when all items are ticked
  • Loading branch information
adarmus committed Jul 12, 2016
1 parent 85df21e commit 842a574
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Filters/TextColumnFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,11 @@ bool ItemIsChecked(string item)

void UpdateFilter(HeaderMouseEventArgs e, TextColumnFilterDialog dialog)
{
var checkedItems = dialog.GetCheckedItems();
SetFilterItems(checkedItems);
if (dialog.AnyUncheckedItems())
SetFilterItems(dialog.GetCheckedItems());
else
SetFilterItems(null); // The user has ticked every item - so no filtering is needed

e.Table.OnHeaderFilterChanged(e);
}

Expand Down

0 comments on commit 842a574

Please sign in to comment.