Skip to content

Commit

Permalink
fix: AutoSuggestBox.QuerySubmitted ChosenSuggestion should not be null
Browse files Browse the repository at this point in the history
  • Loading branch information
aesteves900 committed May 18, 2022
1 parent a2ce826 commit 474d3ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ private void AutoSuggestBox_SuggestionChosen(AutoSuggestBox sender, AutoSuggestB
private void AutoSuggestBox_QuerySubmitted(AutoSuggestBox sender, AutoSuggestBoxQuerySubmittedEventArgs args)
{
querys += 1;
query.Text = "QuerySubmitted: " + querys + " " + args.QueryText;
query.Text = "QuerySubmitted: " + querys + " " + args.QueryText + " " + nameof(args.ChosenSuggestion) + ">>" + args?.ChosenSuggestion ?? "NULL";

}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ private void OnQueryButtonClick(object sender, RoutedEventArgs e)

private void SubmitSearch()
{
QuerySubmitted?.Invoke(this, new AutoSuggestBoxQuerySubmittedEventArgs(null, Text));
QuerySubmitted?.Invoke(this, new AutoSuggestBoxQuerySubmittedEventArgs(_suggestionsList.SelectedItem, Text));
IsSuggestionListOpen = false;
}

Expand Down

0 comments on commit 474d3ef

Please sign in to comment.