Skip to content

Commit

Permalink
Fix Sample App Search
Browse files Browse the repository at this point in the history
Wasn't lowering the query so wasn't doing case-insensitive as desired
Also add searching descriptions of samples
  • Loading branch information
michael-hawker committed Sep 1, 2023
1 parent 86db77d commit 38b37af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CommunityToolkit.App.Shared/Pages/Shell.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ private void searchBox_TextChanged(AutoSuggestBox sender, AutoSuggestBoxTextChan
}
else
{
var query = searchBox.Text;
searchBox.ItemsSource = samplePages?.Where(s => s!.Title!.ToLower().Contains(query) || s!.Keywords!.ToLower().Contains(query) || s!.Category!.ToString().ToLower().Contains(query) || s!.Subcategory!.ToString().ToLower().Contains(query)).ToArray(); ;
var query = searchBox.Text.ToLower();
searchBox.ItemsSource = samplePages?.Where(s => s!.Title!.ToLower().Contains(query) || s!.Description!.ToLower().Contains(query) || s!.Keywords!.ToLower().Contains(query) || s!.Category!.ToString().ToLower().Contains(query) || s!.Subcategory!.ToString().ToLower().Contains(query)).ToArray();
return;
}
}
Expand Down

0 comments on commit 38b37af

Please sign in to comment.